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: 171130 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp76965ily; Mon, 12 Aug 2019 14:52:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsLijGFu12IohknKfK7m7sActx/N7+JMKO0kezNClE3TfEFy2cd13FFhH1qeqo/YwxFZFZ X-Received: by 2002:a63:30c6:: with SMTP id w189mr30777324pgw.398.1565646770525; Mon, 12 Aug 2019 14:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565646770; cv=none; d=google.com; s=arc-20160816; b=Uz2XKIk0Vzwonxpf5RF51+0xOZDWezBtOMDwyrAbVUKZLnBmZ5yO9QnvSHfzMCirnW 4QWrpZRE4TJbp9r4nwdSaDV2EcGfS+aCaoEh+sbZvoFtSr0DtmSAwBrFZKsyTuigxPhX iBmcAG/s9neiebVQ+uhKvU1zd2p5/37Ggh8vsZ4PY+Mg+42S+7oC56wRxbv8caBK34hn HCvm3gc1BTDJoq1bm1tkE/ZN0fsEgzmXx0XUVu1Bh4vd+bTYUqBNgt2cX8cxI9m2NYYn ai5qEOgOXzMSmCTYyoWvU6FYQIpQT7bB3i8ERKdoMEoVS5s82Y0cq7vsUpQFNrnF4ci7 CLiw== 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 l70si11660515pgd.363.2019.08.12.14.52.50; Mon, 12 Aug 2019 14:52:50 -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 S1727964AbfHLVws (ORCPT + 28 others); Mon, 12 Aug 2019 17:52:48 -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 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(-) -- 2.23.0.rc1.153.gdeed80330f-goog 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];