Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp214506ybl; Mon, 12 Aug 2019 14:55:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyg3lK9ZMCdOpeVr3O66jzNVLOmbmJJiIsQLi6mlwSn9W2vnPNJ2kHa3Sbpc2fTSMYUlIw3 X-Received: by 2002:aa7:915a:: with SMTP id 26mr37568686pfi.247.1565646911292; Mon, 12 Aug 2019 14:55:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565646911; cv=none; d=google.com; s=arc-20160816; b=YdaHma1DfuMkNYRLnzxpLjOh43xkD9AGmPmq7MKhgIr8BvYRaiBiTxmVAhGEJjNVnQ Nq6KfdjbW6YskxYEDoxO1bjEQ+Ea/5oWTY5g37/m/s32ZXLi5xFX8zZogKc3kSJbgMUM kKUMqGFexoHqElYD3R2lZLJfIhndVxIVDrBJXTXSxOaZZL4O85XpH3WE+qiavt67I3oQ bEJ7qt6Yer0LlQBABQYSfo4znIdoVcZiHrSwpL/q+4JuAOSWJtX6NK7oCxM5eLsOhRbi mWwE92lg0TxDrzjhLS5j1HDEyWOfSUn2kkAWUui39NJdy+14/Aexy/9RKjek0LXk2xl+ Iw5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=G35OOE0sSfMuupCpgKQ0U4p9HFNylMt7P/lVbiGjqC0=; b=jpeu5gcWiE4+unWBbBuleVP5DGVTE7Gpd9pLxGiNbkVck1cFSd2S12KUFqDd40Jcyw izHAkcdc8Oc5vodlIjT12wzfs8sToGDuTsfwNS+9muVfm5VNT3TZsgAx0xyLYY9/2FII dyYAIh+8qKEgOehMhyqAkeUExclyUJpP6aeEmuR3VU7L5k3C2HUqDbb2b2kK253eyIfO U35ozHV2hyXGrmb8QEhpeHhGgtxAgl2772ceb0jFq7FTGQC7PcqlCo4v5txCrQtbg1lI 254o1xFt7T5WktROSrQS0Y1geDSFE7Cn5L8M8n7HfFKtp2/vmCNkFMfRCRyXgKezLMD+ LkHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qCcbdR00; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q5si31437262pll.279.2019.08.12.14.54.55; Mon, 12 Aug 2019 14:55:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qCcbdR00; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727960AbfHLVwr (ORCPT + 99 others); Mon, 12 Aug 2019 17:52:47 -0400 Received: from mail-pg1-f202.google.com ([209.85.215.202]:44555 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727517AbfHLVwp (ORCPT ); Mon, 12 Aug 2019 17:52:45 -0400 Received: by mail-pg1-f202.google.com with SMTP id i134so28150615pgd.11 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=ZM2MNputIBFTu1usw4X2aT27ICmPIAzh9/U+KwWtkQ9H//4ECESaBYHWnVWuY2ShXk eMIprFI4aZEJTEvWujTYBw0RSYdj8bNMqev0NZiUR8dTTVM00u+qnuAagtNITWVN6S2a /kUxI7YCehWGfrWNJQAp1+a6YVFz7CHfhVIk7N/20xWnLUmRxeLrVlOxRYoD7sKZ/7eN blZvKclKa7P6lfFYPfJywAAcb4b6KIDD112bKVsj9nrdqAVlPSdluQdKA7AFfEQ+Du6m TPgfEx3l/jmQj2Cx4XrXSRuvpASbDGIrRsH18OyDpaMY3RpqxwbnGwA19l13j9EL6MYm 85/A== X-Gm-Message-State: APjAAAVBfKPrkpPjhrT0eXWSfcLiXF7gTX+H/1onl0XFQTJuI3vWY26h 5SG/T2ToyVtI7h1yB4CG7Y8Dv8Swy98R00Xkjl4= 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 Cc: sedat.dilek@gmail.com, jpoimboe@redhat.com, yhs@fb.com, miguel.ojeda.sandonis@gmail.com, clang-built-linux@googlegroups.com, Nick Desaulniers , Catalin Marinas , Will Deacon , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Andrey Konovalov , Greg Kroah-Hartman , Enrico Weigelt , Suzuki K Poulose , Thomas Gleixner , Masayoshi Mizuma , Shaokun Zhang , Alexios Zavras , Allison Randal , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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]; -- 2.23.0.rc1.153.gdeed80330f-goog