From patchwork Wed Sep 19 22:04:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10606597 X-Patchwork-Delegate: rjw@sisk.pl 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 F0C4B921 for ; Wed, 19 Sep 2018 22:05:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1E6D2B8A1 for ; Wed, 19 Sep 2018 22:05:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5F002CA99; Wed, 19 Sep 2018 22:05:37 +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 835432B8A1 for ; Wed, 19 Sep 2018 22:05:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387496AbeITDpK (ORCPT ); Wed, 19 Sep 2018 23:45:10 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:41721 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387483AbeITDpJ (ORCPT ); Wed, 19 Sep 2018 23:45:09 -0400 Received: by mail-ed1-f66.google.com with SMTP id f38-v6so6166052edd.8 for ; Wed, 19 Sep 2018 15:05:12 -0700 (PDT) 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; bh=loKi0hAOYQYVnH7Ulfxh8ug7JOSCbDwsR/x9j4oPl+I=; b=F0U0tdM0S5F+Nh1PbRLVQ/g+0iusj2ziGCHzCNx+KgLbPX0nODSrdnvViVwy2Vqdn/ GGo4AgVvfw/GdvvnRxGZSy07MCYfjUT+3XvlOp8cjF7ET6Sts+YV6mRnJxZ1IaodRaUy GcdZ5+et9OhMcoFalIOqJFhWytIABUjye+coE= 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; bh=loKi0hAOYQYVnH7Ulfxh8ug7JOSCbDwsR/x9j4oPl+I=; b=DQICdXdWJjM4BBTOpjtreO31NPNb6k6E4uuCIXoe/l7GdyJV0M+vJTO56jjOWUNCAA X4aBr2hCjBk/Mj1bJ0LlF0n8++TCAvVU2cJcErI9vIDtljxS3Fv13OndrWiss8oXPR0v zyzZICNXOSTqVCdMuLl3VOvH57EdBkTveNlc35qQGWfqwXQ/BO3cX7RfjpWp79Cp3IF1 0WKF+xN1I9+ofcXzjwRdLFgEh7kdEtPe/YLbNHD0JkjneLUD8z6ksITzwbCdwgZ0/974 sZ9WQXZHqc5nrhe9ida0eNXYEUVmAFqjxUmaZZUKqH/p3+8gX5CjBfxScmFIom2Q6nQW LrEA== X-Gm-Message-State: APzg51A5cayVnHzYelZyE92Q1Kc6wUuIl7rimXaQMuI192F/VceWvvCd 254TaryCDcbzDrY0IdhYHlrVGUFs9kTefYrH X-Google-Smtp-Source: ANB0VdZK3nRtB9HhDVKPc793xgSrcRHH4Pt96Mc13AeLXldIQFG0GGFC1YU9yvfa0zyPsoPjRaWK7Q== X-Received: by 2002:a50:92ce:: with SMTP id l14-v6mr61997732eda.43.1537394711689; Wed, 19 Sep 2018 15:05:11 -0700 (PDT) Received: from prevas-ravi.waoo.dk (dhcp-5-186-115-161.cgn.ip.fibianet.dk. [5.186.115.161]) by smtp.gmail.com with ESMTPSA id a9-v6sm2798edi.26.2018.09.19.15.05.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Sep 2018 15:05:11 -0700 (PDT) From: Rasmus Villemoes To: Jason Baron , Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org Subject: [PATCH 15/22] ACPI: use proper DYNAMIC_DEBUG_BRANCH macro Date: Thu, 20 Sep 2018 00:04:37 +0200 Message-Id: <20180919220444.23190-16-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180919220444.23190-1-linux@rasmusvillemoes.dk> References: <20180919220444.23190-1-linux@rasmusvillemoes.dk> 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 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 de8d3d3fa651..21e03aa32aae 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -982,7 +982,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 Wed Sep 19 22:04:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10606593 X-Patchwork-Delegate: rjw@sisk.pl 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 931E5921 for ; Wed, 19 Sep 2018 22:05:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 836A72BBD0 for ; Wed, 19 Sep 2018 22:05:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7766D2CA99; Wed, 19 Sep 2018 22:05:17 +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 23FCA2BBD0 for ; Wed, 19 Sep 2018 22:05:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387482AbeITDpL (ORCPT ); Wed, 19 Sep 2018 23:45:11 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:37991 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387495AbeITDpK (ORCPT ); Wed, 19 Sep 2018 23:45:10 -0400 Received: by mail-ed1-f67.google.com with SMTP id h33-v6so6183015edb.5 for ; Wed, 19 Sep 2018 15:05:13 -0700 (PDT) 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; bh=A80wQthOJgi0twLRVcMWnZiiuFKRtq/Sn+wCLsW8RZ8=; b=WM1E0gwkEmUa4NDj84wp4sfLaVBF0hg5OWAOTHFVximkz+IJOZ6nxC+9zcKzaUww2I nMuffbYjWkz4MveGGn4qW/XNpgR0fyNmk2NUOdBCWXTF825tWyZLS6CQtUeVLV/UFLgE 4THvuqWIpXUyOiX2i5SfNKmIVxqy1+kg9g0NI= 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; bh=A80wQthOJgi0twLRVcMWnZiiuFKRtq/Sn+wCLsW8RZ8=; b=i6OWe5yjHpUz4LNr8WnGAQ3LC5y7EjfvQR1HWwSOQSWsl57JahywgC59NiaPtmGguE vpQuxZTAUij7a+TaHBw2b9cVHTT9xqKWhL+yM8ryK22alDiI/APnsL3ziItSQzHdR2QH Cdqp7FLeclrvfhCj+OHtWnt7nvMDn7NdD56T3JpUpsOSDoo/xRKCuDyy9/ptJpTD86vK 0u+VZI9UgJL3nRo2kRJqtviI6sz2/1HHecNl6pDzZzKIs1PGw9HT+OTOlOqg9e/A50tl DBs0KYG1VzYJRWIUvOABrV47PE5eNue0dI2LEIfUE/Zk/JIRBhIoXMIbX++YLRns6cnY RB0Q== X-Gm-Message-State: APzg51DNr+D3qsVhPII54oSy2mMAvFjTFEB7uQyyqV/VllvBSG7wMPLM 8mVbDv7ldfaBGrtfT8earsCvAw== X-Google-Smtp-Source: ANB0VdZaTW+OD6OptL93zT3Z5Phh2W2UT7NWb3h2W00MHU9KqPEoqpQ4flRHeU+fTujzV5PtnkIceA== X-Received: by 2002:a50:ec03:: with SMTP id g3-v6mr61150178edr.96.1537394713116; Wed, 19 Sep 2018 15:05:13 -0700 (PDT) Received: from prevas-ravi.waoo.dk (dhcp-5-186-115-161.cgn.ip.fibianet.dk. [5.186.115.161]) by smtp.gmail.com with ESMTPSA id a9-v6sm2798edi.26.2018.09.19.15.05.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Sep 2018 15:05:12 -0700 (PDT) From: Rasmus Villemoes To: Jason Baron , Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org Subject: [PATCH 16/22] ACPI: remove unused __acpi_handle_debug macro Date: Thu, 20 Sep 2018 00:04:38 +0200 Message-Id: <20180919220444.23190-17-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180919220444.23190-1-linux@rasmusvillemoes.dk> References: <20180919220444.23190-1-linux@rasmusvillemoes.dk> 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 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 21e03aa32aae..e12d5ef1a054 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -948,9 +948,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 Wed Sep 19 22:04:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10606595 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 83EA4921 for ; Wed, 19 Sep 2018 22:05:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 736C12BBAF for ; Wed, 19 Sep 2018 22:05:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 676C22CAC9; Wed, 19 Sep 2018 22:05:29 +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 15BD72BBAF for ; Wed, 19 Sep 2018 22:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387514AbeITDpM (ORCPT ); Wed, 19 Sep 2018 23:45:12 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:37295 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387495AbeITDpM (ORCPT ); Wed, 19 Sep 2018 23:45:12 -0400 Received: by mail-ed1-f68.google.com with SMTP id a20-v6so6177195edd.4 for ; Wed, 19 Sep 2018 15:05:15 -0700 (PDT) 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; bh=ZnAb6cCBC8ah3DmJhREWNHBuYwNcmaAAPZ+lXSIi240=; b=Acw7Zrbj35k1L7Zk+2zd/dNVQQfI/RS/7MKg/XUdrlV/l2GQvNKgaX8yCWNS8t7Xma Cy914RSZw/cuOGeyBCxck6Or/niZdAHplzI5X9gT1ablsmdMBGPOusecCJRpVexQc+CH d6HCEYl7846MsWD+/8IEiKokSGh5vjVoUe1G4= 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; bh=ZnAb6cCBC8ah3DmJhREWNHBuYwNcmaAAPZ+lXSIi240=; b=f53SWDk0ucwKUj980M4uYYv20wgUzRvpyOZJNJwGhJQTJrIj5nyI1VfjuchwfCsMQW Y95rUbPK9swIedWxcvh9Jjj9TEfweBs0NDTGhla1l88ng0xUbDkgjogeRcXiz15QAj0W 4Z2IEpcPoBP/KEQV+cglmwTTCARoH8z0fq05wfIShqTBdx2JMZie/Jg9yLEaVaPL51UK mUPrInT1HkpoXp1gBll3aLtjS23eQXLGnaHI1sFA8eomE40p2FsLWYgVZt9ZS1te5tR+ r7pGgKpDRR2/MW/CMnI3smJ6eLA4EZVXAWgqgL+QGn8erJkbVNH5bJ5Amvtn1w9v8omJ RxwA== X-Gm-Message-State: APzg51AVNFaAGro5s2SAimxqcMPKEUkL9+SRSsLO6KOfvJs8mEO+s3oV YjJ075uaICn+ALRV+pDTLYtFEu7bevhDqTi1 X-Google-Smtp-Source: ANB0VdYOp5gDvqteWKMJMBBVhe6Q+1puUZEkLxTZjtiOxge5iqQ6XqKYrBcaxJH29ERfENH+Nu+GIw== X-Received: by 2002:a50:bb69:: with SMTP id y96-v6mr62368010ede.10.1537394714619; Wed, 19 Sep 2018 15:05:14 -0700 (PDT) Received: from prevas-ravi.waoo.dk (dhcp-5-186-115-161.cgn.ip.fibianet.dk. [5.186.115.161]) by smtp.gmail.com with ESMTPSA id a9-v6sm2798edi.26.2018.09.19.15.05.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Sep 2018 15:05:14 -0700 (PDT) From: Rasmus Villemoes To: Jason Baron , Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org Subject: [PATCH 17/22] ACPI: implement acpi_handle_debug in terms of _dynamic_func_call Date: Thu, 20 Sep 2018 00:04:39 +0200 Message-Id: <20180919220444.23190-18-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180919220444.23190-1-linux@rasmusvillemoes.dk> References: <20180919220444.23190-1-linux@rasmusvillemoes.dk> 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 Signed-off-by: Rasmus Villemoes Acked-by: Rafael J. Wysocki --- 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 e12d5ef1a054..83bacf9039e9 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -977,12 +977,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, ...) \ ({ \