From patchwork Mon Aug 12 21:50:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 11090927 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 1470E112C for ; Mon, 12 Aug 2019 21:52:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0283C28563 for ; Mon, 12 Aug 2019 21:52:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAB0228574; Mon, 12 Aug 2019 21:52:11 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8FA4C28563 for ; Mon, 12 Aug 2019 21:52:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version :Message-Id:In-Reply-To:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FZC8B1zTjHRmBS4vpV4gDcGx8wPYZBTmjPNNNDgCFLY=; b=FlniZAuqzfqWnl 2d0X2n/EIlhx41MPki3AxUmsM4ye5UwpE4oTOdAoDOoqfN4OITi8yrN8ALWhPriu0u5OOo4XJY84l NeaoJ0SflLLejIr2R5zTBjYR5oaI+jyIJOPewpE1EZ1Kycw9VLtcuw1cCTO7sOft1MBx9dbA6cH3/ mH2I74BYGwbo5qavPh/+RDEVJVYhm3xR++kisrvC4uYHHdjyr2Esh2f8I/4XIWKcbgmOWF1BbN3hw 4WqKa6VIi3O6kojmEipDQzrGLXWHkZGSlnifdoEI/87P+TBWQj0CN9AgH1PLTgOve2/CTHWdAL0Pd p6oqRt9Lol3ainOeCsjQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxIEc-0004O9-Kb; Mon, 12 Aug 2019 21:52:10 +0000 Received: from mail-qk1-x74a.google.com ([2607:f8b0:4864:20::74a]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxIEY-0004Mu-C9 for linux-arm-kernel@lists.infradead.org; Mon, 12 Aug 2019 21:52:07 +0000 Received: by mail-qk1-x74a.google.com with SMTP id c79so94768952qkg.13 for ; Mon, 12 Aug 2019 14:52:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=4H9PWcGFWTnQRRpR6qzftNQ0lP7jmcpJc1z5bvKXC0c=; b=GOYts8y62z5hDG5UBvKTyRA53eo64IPfTWzoj20oJPWRcHrTKxwsvLxh3a4n5gbZEv PEmhfuyQJErUyzHsQgmc+BxiQ+0zaHqdQPYkHNoGmXn1M/p3nNSyCS4YS+QnjsSu15e/ 4p9ECmVJbtW52/m719Gd9XDThtFlJaVi8EAw8eYS5rrF7pNdIpC8S3YQAtKU4R/HoM1y BQi3xcPQqrL81dRaMBvh/8Aty6jeE0XDlyzQopxkixPirRMhNQ2BW7dcG4t34N56iTRJ t5GaJvbA2lpJTkd80ffPOg6j49O1q9MIvTWyeV3HEdK0REH1ZKW2JM3VYuddT4rKkiLa 91eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=4H9PWcGFWTnQRRpR6qzftNQ0lP7jmcpJc1z5bvKXC0c=; b=CUkmKHhLAJjZ4LGYJW/tUVlHeu0r2asKPkPT0S8Y3YYd2PHoz1Z6FxCpPhK42UlFk0 c7l7SVfaZt6ZozwTQ4uGatbsfzYrnN1piVN+P04CW4+/IKD/Lk6LtGxnf85G5DGTopMY T7hFZ+WuWW0aKw3ewbdZdBkdjuHy9XJhEhx47704kpPt0G4Ka49ZNoMfXNwLFO/r5do6 eS1Wn9iRxd6PwgKQDzuZ1cBqClpL59NrVBJoGpYcCG2oz1UftIyWro/BONLK6G2KjLob RCuW+zpBGYH2hTlGCEi+oeDWmj8gvwi8MlxxezaEBGTCSiksYhx/sAoYrCn+GK54TUpg kiXw== X-Gm-Message-State: APjAAAVHJCbP3Y6HlLqpSkO/uDHa3orgMRUSW7tnDX6V6//eJQV89gtS E9DTa+EHxEvE+5l+kcPqNbFGN4e1EYTir/iAYaA= X-Google-Smtp-Source: APXvYqwes1gV2IDw+8Qi/1BZf+2RvRVqWZMirG+2WSzT6D2Sl6v9dobOMCg6A6UD4p/INQTsMrciAWtKuTDBsrcdsyU= X-Received: by 2002:ac8:45d2:: with SMTP id e18mr6288417qto.241.1565646724122; Mon, 12 Aug 2019 14:52:04 -0700 (PDT) Date: Mon, 12 Aug 2019 14:50:40 -0700 In-Reply-To: <20190812215052.71840-1-ndesaulniers@google.com> Message-Id: <20190812215052.71840-7-ndesaulniers@google.com> Mime-Version: 1.0 References: <20190812215052.71840-1-ndesaulniers@google.com> X-Mailer: git-send-email 2.23.0.rc1.153.gdeed80330f-goog Subject: [PATCH 07/16] arm: prefer __section from compiler_attributes.h From: Nick Desaulniers To: akpm@linux-foundation.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190812_145206_409580_842D6ABC X-CRM114-Status: GOOD ( 11.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kate Stewart , Song Liu , linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Daniel Borkmann , miguel.ojeda.sandonis@gmail.com, Greg Kroah-Hartman , Nick Desaulniers , Russell King , Alexei Starovoitov , netdev@vger.kernel.org, clang-built-linux@googlegroups.com, Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, jpoimboe@redhat.com, sedat.dilek@gmail.com, yhs@fb.com, Thomas Gleixner , Enrico Weigelt , Martin KaFai Lau , Allison Randal Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Reported-by: Sedat Dilek Suggested-by: Josh Poimboeuf Signed-off-by: Nick Desaulniers --- arch/arm/include/asm/cache.h | 2 +- arch/arm/include/asm/mach/arch.h | 4 ++-- arch/arm/include/asm/setup.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h index 1d65ed3a2755..cc06079600e0 100644 --- a/arch/arm/include/asm/cache.h +++ b/arch/arm/include/asm/cache.h @@ -24,6 +24,6 @@ #define ARCH_SLAB_MINALIGN 8 #endif -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(.data..read_mostly) #endif diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index e7df5a822cab..2986f6b4862d 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h @@ -81,7 +81,7 @@ extern const struct machine_desc __arch_info_begin[], __arch_info_end[]; #define MACHINE_START(_type,_name) \ static const struct machine_desc __mach_desc_##_type \ __used \ - __attribute__((__section__(".arch.info.init"))) = { \ + __section(.arch.info.init) = { \ .nr = MACH_TYPE_##_type, \ .name = _name, @@ -91,7 +91,7 @@ static const struct machine_desc __mach_desc_##_type \ #define DT_MACHINE_START(_name, _namestr) \ static const struct machine_desc __mach_desc_##_name \ __used \ - __attribute__((__section__(".arch.info.init"))) = { \ + __section(.arch.info.init) = { \ .nr = ~0, \ .name = _namestr, diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index 67d20712cb48..00190f1f0574 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h @@ -14,7 +14,7 @@ #include -#define __tag __used __attribute__((__section__(".taglist.init"))) +#define __tag __used __section(.taglist.init) #define __tagtable(tag, fn) \ static const struct tagtable __tagtable_##fn __tag = { tag, fn } From patchwork Mon Aug 12 21:50:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 11090931 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 816BC1398 for ; Mon, 12 Aug 2019 21:52:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BB3A28573 for ; Mon, 12 Aug 2019 21:52:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D1B72857B; Mon, 12 Aug 2019 21:52:50 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0880628573 for ; Mon, 12 Aug 2019 21:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version :Message-Id:In-Reply-To:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n7sKbfbQqyFjgDHOwk+Iu4vHCPKGQuiNVws59Q4zxbk=; b=sQkKtsmzo/T/l1 tYlgNGIbvzcUJkAGYc3b088S/yGoV5ICRjjYFtBmhvxvWZR5/6Emj93DBRcVV/Cg0FPcSMkKOX7ZX QwA+K036SFiYwT295QRITSpCJfyObQFgnwPLMM7xloEVh8xEpbzD25aFsodE1e59pr2RamwJblxAH yj3tzPX39Rw55khFMyD4orw5v3Y9vANe4b0tuKB1HfGeesCpbWm9e4U8O1SvD91GrCC0PTmYwCj5C YS2ZJl6zZWZREerAI8DF9kPbXrON8KrnrD5D4NOnUwT9ia/2775ZAUrQO+OK3NdjvsHfv41Fy5M10 A0H8BQYDMq/T0OB6h81g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxIFF-0004gj-Jf; Mon, 12 Aug 2019 21:52:49 +0000 Received: from mail-pf1-x449.google.com ([2607:f8b0:4864:20::449]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxIFB-0004fx-BU for linux-arm-kernel@lists.infradead.org; Mon, 12 Aug 2019 21:52:46 +0000 Received: by mail-pf1-x449.google.com with SMTP id w30so3245004pfj.4 for ; Mon, 12 Aug 2019 14:52:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=G35OOE0sSfMuupCpgKQ0U4p9HFNylMt7P/lVbiGjqC0=; b=qCcbdR00iqgqZ/gG+jyOtF9Vncm844UkTWidc/xDIrreYwf0T8fY8OG5dIQRuiIxUe FzmJOT/4MTg94OWbw0D9mWByCs1880fYzbD8pk0R6AkDeFsG731eVhxBT+J45lFhFbwf mlOlBZtSLGRqW7vKpUirVuKzaLN7Rjm4AfAx434gpgHK8OnXp1izWDswYuMTZaX7/v+k E5rmfQINbPC0sfjRL04ILiNYMQYE/0nCRU4hiRjda6N7E6/6+GyHD0Ng7d2h3RK1UWj6 dgszycG/x5ZESFf+qAorMsQgsHnfLzNx5F9k2KWcorwNp2pin4MzhBg34i9DY6K23R8/ UIAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=G35OOE0sSfMuupCpgKQ0U4p9HFNylMt7P/lVbiGjqC0=; b=OSkH0k6CbPB/FUo0Z/t6j4vmLVj5wa9YREzIw3q0ISYKLpT6v9FOqCHdiECWCEP2RS tW1bwN5c/bWD/oGAFoBOyikLUWYtINnsqMMp1ZCd9ZLZtFmpbdvXQXmgFhyF0Gurn3/I DDzDsUSbUx7uzvh/vLyMWirnU4LbeZIuPFkMcE91ZSz36MAYuLgqWeW3aqLrOQ1zIjVK oleA3/IsIdLKzooq1770dSruWceGUP+5E0VFBBoI7DIxgaKub6ZXqxwSml9N6PkjjbVN AkDk8sAac/7WzjCD/Z5G9nbxO+g9u4pn301XqUGoG/Y9ihWKhQPpjH4mvc6/oYugEpAy jexw== X-Gm-Message-State: APjAAAWNp42/Asyoshc/k88KAo3/vN6FXzfwMDUYnG/fqnqBTHj9Vd4m 6GjrcbC2RcFp/WgtWiUc0eFvf9QG8k4VcagYMUI= X-Google-Smtp-Source: APXvYqxLWMFYSVfr9/WeBe4JYuK0mMWVB3QFQmdMAe16b4tQpW2+ajfgokDvaDbjaNDG0XIPT7kh9+HxxjG7h46tDzs= X-Received: by 2002:a65:6114:: with SMTP id z20mr32341554pgu.141.1565646764247; Mon, 12 Aug 2019 14:52:44 -0700 (PDT) Date: Mon, 12 Aug 2019 14:50:45 -0700 In-Reply-To: <20190812215052.71840-1-ndesaulniers@google.com> Message-Id: <20190812215052.71840-12-ndesaulniers@google.com> Mime-Version: 1.0 References: <20190812215052.71840-1-ndesaulniers@google.com> X-Mailer: git-send-email 2.23.0.rc1.153.gdeed80330f-goog Subject: [PATCH 12/16] arm64: prefer __section from compiler_attributes.h From: Nick Desaulniers To: akpm@linux-foundation.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190812_145245_394167_5FC0A345 X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Song Liu , Catalin Marinas , Alexei Starovoitov , Will Deacon , Daniel Borkmann , clang-built-linux@googlegroups.com, Allison Randal , yhs@fb.com, Masayoshi Mizuma , Suzuki K Poulose , Andrey Konovalov , Shaokun Zhang , Alexios Zavras , jpoimboe@redhat.com, sedat.dilek@gmail.com, Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , Nick Desaulniers , linux-kernel@vger.kernel.org, miguel.ojeda.sandonis@gmail.com, netdev@vger.kernel.org, bpf@vger.kernel.org, Enrico Weigelt , Martin KaFai Lau Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP GCC unescapes escaped string section names while Clang does not. Because __section uses the `#` stringification operator for the section name, it doesn't need to be escaped. This antipattern was found with: $ grep -e __section\(\" -e __section__\(\" -r Reported-by: Sedat Dilek Suggested-by: Josh Poimboeuf Signed-off-by: Nick Desaulniers --- arch/arm64/include/asm/cache.h | 2 +- arch/arm64/kernel/smp_spin_table.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/cache.h b/arch/arm64/include/asm/cache.h index 64eeaa41e7ca..43da6dd29592 100644 --- a/arch/arm64/include/asm/cache.h +++ b/arch/arm64/include/asm/cache.h @@ -78,7 +78,7 @@ static inline u32 cache_type_cwg(void) return (read_cpuid_cachetype() >> CTR_CWG_SHIFT) & CTR_CWG_MASK; } -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(.data..read_mostly) static inline int cache_line_size_of_cpu(void) { diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c index 76c2739ba8a4..c8a3fee00c11 100644 --- a/arch/arm64/kernel/smp_spin_table.c +++ b/arch/arm64/kernel/smp_spin_table.c @@ -19,7 +19,7 @@ #include extern void secondary_holding_pen(void); -volatile unsigned long __section(".mmuoff.data.read") +volatile unsigned long __section(.mmuoff.data.read) secondary_holding_pen_release = INVALID_HWID; static phys_addr_t cpu_release_addr[NR_CPUS];