From patchwork Tue Feb 12 21:41:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10808751 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CF43613B4 for ; Tue, 12 Feb 2019 21:42:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFB442C1B0 for ; Tue, 12 Feb 2019 21:42:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3D5F2C1B3; Tue, 12 Feb 2019 21:42:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EF092C1B0 for ; Tue, 12 Feb 2019 21:42:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729213AbfBLVm1 (ORCPT ); Tue, 12 Feb 2019 16:42:27 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:38454 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731109AbfBLVmL (ORCPT ); Tue, 12 Feb 2019 16:42:11 -0500 Received: by mail-ed1-f66.google.com with SMTP id h58so170510edb.5 for ; Tue, 12 Feb 2019 13:42:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8tQBQN4Gd6A8alQknyIJodX2WHALuebxSd6qUkfi74o=; b=KU3L829wnKF3SqK9LvGSd5qn/DtJqWO0TXSvxIKBmY7yRvVRmV7M5zHCJIPYK9zoP8 +5jWbVxOVuFSIzdVeYVHE/JvYd9S82moo64g+Xv8QUJDtSRxwUJF5sLxCt1JrCRhggtg KxxJ2PYCg+wCm0WpdCPciFq9Bld6NV7h8J8AQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8tQBQN4Gd6A8alQknyIJodX2WHALuebxSd6qUkfi74o=; b=ELh1+lbG3AQU56lPoNxcCbe1VKCSdi4Zgw4fQXOoS36W0yQu67+cwmva2Y8sGWunC2 X8vpMOViq2iAEijmSzauc9jonBDh6CQNR3EHP64M2gsd18LH0GIkdSg6YhXSqrh4/K0B J1Ju2I8SRo9TATgeGjJe6VmlOFP9vWFBpWmAc0IVneVuELXxocLW8BN7z8bEIOcZdRwx Q8I8YMKwuhs3KaZQOcbsZEYxhMqn8VqeYcC8jgUJrzAtLaPvttSugMEMER8sugd/k3Cz bvCkxQybiH7WZCyWCuArUXSBq/tq/89fRulOwZl7kGV90CFd9a2UgSpeuAsJ8ASohulk no3Q== X-Gm-Message-State: AHQUAuYXiilxRxZ2mv1tVx0EeCyVPnZKbdF3Ep3yH1P1n+h2ICT3DM3s WYZrVjWh67j3FLEdMTtvaekIGA== X-Google-Smtp-Source: AHgI3IYL7fHn0xJXjApiE5SmBJ8UwAZZS+WdZlHg+5w7Yf1q7tu7fRto9wYUuQrJ0ouTZqDfQEUXVQ== X-Received: by 2002:a17:906:9146:: with SMTP id y6mr1556765ejw.153.1550007729860; Tue, 12 Feb 2019 13:42:09 -0800 (PST) Received: from prevas-ravi.waoo.dk (ip-5-186-119-174.cgn.fibianet.dk. [5.186.119.174]) by smtp.gmail.com with ESMTPSA id v1sm3697607eds.47.2019.02.12.13.42.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Feb 2019 13:42:09 -0800 (PST) From: Rasmus Villemoes To: Andrew Morton , Jason Baron Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org, "Rafael J . Wysocki" Subject: [PATCH v4 12/14] ACPI: use proper DYNAMIC_DEBUG_BRANCH macro Date: Tue, 12 Feb 2019 22:41:48 +0100 Message-Id: <20190212214150.4807-13-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190212214150.4807-1-linux@rasmusvillemoes.dk> References: <20190212214150.4807-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP dynamic debug may be implemented via static keys, but ACPI is missing out on that runtime benefit since it open-codes one possible definition of DYNAMIC_DEBUG_BRANCH. Cc: linux-acpi@vger.kernel.org Acked-by: Jason Baron Acked-by: Rafael J. Wysocki Signed-off-by: Rasmus Villemoes --- include/linux/acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 87715f20b69a..bcdfbb2bea24 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -987,7 +987,7 @@ void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const c #define acpi_handle_debug(handle, fmt, ...) \ do { \ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ - if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ + if (DYNAMIC_DEBUG_BRANCH(descriptor)) \ __acpi_handle_debug(&descriptor, handle, pr_fmt(fmt), \ ##__VA_ARGS__); \ } while (0) From patchwork Tue Feb 12 21:41:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10808749 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3159C1390 for ; Tue, 12 Feb 2019 21:42:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 223162C1B0 for ; Tue, 12 Feb 2019 21:42:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 165232C1B7; Tue, 12 Feb 2019 21:42:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0289E2C1B0 for ; Tue, 12 Feb 2019 21:42:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732027AbfBLVmP (ORCPT ); Tue, 12 Feb 2019 16:42:15 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:38457 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732004AbfBLVmM (ORCPT ); Tue, 12 Feb 2019 16:42:12 -0500 Received: by mail-ed1-f67.google.com with SMTP id h58so170564edb.5 for ; Tue, 12 Feb 2019 13:42:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0CJkTbgJKOf88jN5+EgmNcUAF0M4eYSxUZoWqS4bWAE=; b=f7cMWEOtPGa3jZLsH7hxYOFTebuDoAGpNDD4/NdGRVixUtpB3SAQ5XPzOJxrWe3wI2 rgKwgtFgxqqALIelG+W0z4wJc0FQf3KLKxxCukfHi3hh75uT9rPhdBimIeKOCb9/85le dbo0/9RMRIXfxmw75OMgaKm/5Xv45C6Dsk91Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0CJkTbgJKOf88jN5+EgmNcUAF0M4eYSxUZoWqS4bWAE=; b=oH+Em5P1e7GkT2K7MyYUJlVW8q1PVjCJQu327CtouyNcaZpPH8mSjwN9rFP4RsQI5d SBZP/uYA5SzlmtCGU3Fpafx4GL1t1oE8GxroOdFu9aciUJ72lbknk9spdM3PKdM8oErF 7Zx0eu4qhznsNV7Do98ZSagtFD2pNK6IT+y9Uv07+J+CHBmqxxu7p4EQTxlEGEU/rOFi fJFD59XaMzcQSMLAiWLmcsPzzonf3Vpjz6ZNzCDmjelqcohFP6iLG+w/NnllfAz100il 3utXtAL99AtElNdwAe1JBCyx65Gr7810B0UGFW3KLKKZVBIHRQiKJwvLcsHHVTBcnCjk s9/w== X-Gm-Message-State: AHQUAuZcKegpxaZeb7lHlEjgnYp67E6/PeZwAD/7URRQSc4biUYV6nzk cWzLXXiOltDRlPm/tj03lZDTLQ== X-Google-Smtp-Source: AHgI3IYqDHlyTHPy2gjWpREAoQDXmitARjvnAHQb8vuQcpPY97D6ufvrhhJJ5hPRMxCIgJmXaP8s3A== X-Received: by 2002:a17:906:34c2:: with SMTP id h2mr4146244ejb.234.1550007730978; Tue, 12 Feb 2019 13:42:10 -0800 (PST) Received: from prevas-ravi.waoo.dk (ip-5-186-119-174.cgn.fibianet.dk. [5.186.119.174]) by smtp.gmail.com with ESMTPSA id v1sm3697607eds.47.2019.02.12.13.42.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Feb 2019 13:42:10 -0800 (PST) From: Rasmus Villemoes To: Andrew Morton , Jason Baron Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org, "Rafael J . Wysocki" Subject: [PATCH v4 13/14] ACPI: remove unused __acpi_handle_debug macro Date: Tue, 12 Feb 2019 22:41:49 +0100 Message-Id: <20190212214150.4807-14-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190212214150.4807-1-linux@rasmusvillemoes.dk> References: <20190212214150.4807-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If CONFIG_DYNAMIC_DEBUG is not set, acpi_handle_debug directly invokes acpi_handle_printk (if DEBUG) or does a no-printk (if !DEBUG). So this macro is never used. Cc: linux-acpi@vger.kernel.org Acked-by: Jason Baron Acked-by: Rafael J. Wysocki Signed-off-by: Rasmus Villemoes --- include/linux/acpi.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index bcdfbb2bea24..07b9fa507824 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -953,9 +953,6 @@ acpi_handle_printk(const char *level, void *handle, const char *fmt, ...) {} #if defined(CONFIG_ACPI) && defined(CONFIG_DYNAMIC_DEBUG) __printf(3, 4) void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const char *fmt, ...); -#else -#define __acpi_handle_debug(descriptor, handle, fmt, ...) \ - acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__); #endif /* From patchwork Tue Feb 12 21:41:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10808747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE90713B4 for ; Tue, 12 Feb 2019 21:42:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD3F42C1B2 for ; Tue, 12 Feb 2019 21:42:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D18ED2C1B7; Tue, 12 Feb 2019 21:42:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7195D2C1B2 for ; Tue, 12 Feb 2019 21:42:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732035AbfBLVmP (ORCPT ); Tue, 12 Feb 2019 16:42:15 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:43092 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732027AbfBLVmO (ORCPT ); Tue, 12 Feb 2019 16:42:14 -0500 Received: by mail-ed1-f65.google.com with SMTP id f9so146973eds.10 for ; Tue, 12 Feb 2019 13:42:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cZ4+J3qclzOiT4eS0G4mZNYid/q8EGWND5FwtaRiLJ8=; b=hHF9WyDE2qOpSpiKv2V9o9VpxsQ8Tyea718fPZiTOnGLYLYqbzDy3UdC6NxlaEWYhV TevrN4gYd7No7KG51GQaGc8a63kgjFm02Jgcomz75qpeL1DN5vC4XaB39F0UxRW9oMrE bX+JbiaAEMhSGhv1zDfyw7LprZQVOW7uNTuBg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cZ4+J3qclzOiT4eS0G4mZNYid/q8EGWND5FwtaRiLJ8=; b=T8p8jPT31kef19+v1A9B2WYMf1bZebVp+oweAGvzA+WsZLIY8RuFXXuCi2DMvDN1Ix yla4tFtOudQU941EyQtjw74wE4Z4mHhKz7beOoy+FHJcqTdCyJric0tGqzENhHpjF/iJ Kee6y9IxMZ10CcLrBkl/K2/pOImMwKEHFTIrmYKa62xwin5t9FlUnZoCn5N6D7N+CO15 tfG/IDRV2vGyUfyNUUpXR4qGANnINO/kJ3MQw8tF5vlDZHgQ7b176NVDMGFmXINT1ppC 636GZijnXohzckEjYQOjl+7ONHnZ8EOdB1NZXRyp4WgncDGgbGQk5hIDIJOQVbzwYwnd 7OMA== X-Gm-Message-State: AHQUAuakDAeSSiO3TrEiW/Iw4hLaAFCb/sQKKaMQKVDZZbC9RQUAhhVR CHgzst6ne5EvuabXjSmNcM8iaA== X-Google-Smtp-Source: AHgI3IYrtip8cBj7kxoj867+/Ik7PgoLY01O4UY+7t1axbQcVGamLRLlzTIbsdR9qeWMs2prSy+rJw== X-Received: by 2002:a50:a982:: with SMTP id n2mr4669797edc.236.1550007732014; Tue, 12 Feb 2019 13:42:12 -0800 (PST) Received: from prevas-ravi.waoo.dk (ip-5-186-119-174.cgn.fibianet.dk. [5.186.119.174]) by smtp.gmail.com with ESMTPSA id v1sm3697607eds.47.2019.02.12.13.42.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Feb 2019 13:42:11 -0800 (PST) From: Rasmus Villemoes To: Andrew Morton , Jason Baron Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org, "Rafael J . Wysocki" Subject: [PATCH v4 14/14] ACPI: implement acpi_handle_debug in terms of _dynamic_func_call Date: Tue, 12 Feb 2019 22:41:50 +0100 Message-Id: <20190212214150.4807-15-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190212214150.4807-1-linux@rasmusvillemoes.dk> References: <20190212214150.4807-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With coming changes on x86-64, all dynamic debug descriptors in a translation unit must have distinct names. The macro _dynamic_func_call takes care of that. No functional change. Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Acked-by: Jason Baron Signed-off-by: Rasmus Villemoes --- include/linux/acpi.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 07b9fa507824..96c4eaed9439 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -982,12 +982,8 @@ void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const c #else #if defined(CONFIG_DYNAMIC_DEBUG) #define acpi_handle_debug(handle, fmt, ...) \ -do { \ - DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ - if (DYNAMIC_DEBUG_BRANCH(descriptor)) \ - __acpi_handle_debug(&descriptor, handle, pr_fmt(fmt), \ - ##__VA_ARGS__); \ -} while (0) + _dynamic_func_call(fmt, __acpi_handle_debug, \ + handle, pr_fmt(fmt), ##__VA_ARGS__) #else #define acpi_handle_debug(handle, fmt, ...) \ ({ \