From patchwork Wed Aug 28 22:55:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 172491 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1395752ily; Wed, 28 Aug 2019 15:56:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0hBbAQKts/memw4Opw6jmNgg4Cc856+eskCMsbRqEJ/B0aRaDMQFPdtiZ+GUESVfA2xdn X-Received: by 2002:a63:c442:: with SMTP id m2mr5687040pgg.286.1567032969925; Wed, 28 Aug 2019 15:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567032969; cv=none; d=google.com; s=arc-20160816; b=XQenXTj+1niEp3RckIHBcNL2g04m4hZnKmLJbh6kFq9U13Gaaw8eZ82pbnCPgKvDqy MmMdSGSBxqeYfhycIcDvVSCozx1yzECyQq/0Bj/DHHcOYFy5gJDLsi69CRLDFaJrOfaI FsH/ud0w6LgxA6ncjn9PjSsVMk0WLasqhzvTpDbKuxDKwlMQnbsnkKAiDMqw8bV9l+6o iF/IR/258lbqoac8SVB7PrvoXICwMwktMoiEviSIax7WXZZUhNAWWBPGeKOmC6k0iZIp PhGh+xZzK0e5wGP1gE62YE4hUOKBX7RGEUQY8xLqF5eE4Fc2P8NDNLwk7xt91lmtjJYp 9xDg== 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=qtui76zbZDjBR4fv6nr88v7Tjsdi7Bt5xxDWhf7dUos=; b=jy2w5weRFFVB3/880b5wceoQttAM6E+lsy2nTh++rpqYKdYxlt36F5h3hDy0TRv9T3 0powJBiRq6lI6NTsCNCR/0ACa3ZuUaf6f7lkrcITsqZU3r/+TH0fbXYHmXWZPJ5AH0un kLZykFOffzvAkv4W+xZ/9Ce9WgnAlOfGQCogk7r6zjKZha+6iZI6Yv4ga+z65fEdQ1k3 8N+HGgvallKmL/g8TmDyLZOne4tmb4nVFlmtAQ13oz0xvMrWpcCfd2PspSmDtzZ0Qqns H3ty5lg6eT6LDSMCJ9BNd5K9Lz6rDnWKM78FoWtNzV6MH0DP+3GwXG8aH2dcLHfZB4yf Du9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hJ7AtSw7; 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 68si392463pgb.104.2019.08.28.15.56.09; Wed, 28 Aug 2019 15:56:09 -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=hJ7AtSw7; 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 S1727182AbfH1W4I (ORCPT + 28 others); Wed, 28 Aug 2019 18:56:08 -0400 Received: from mail-pg1-f202.google.com ([209.85.215.202]:39682 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727124AbfH1W4G (ORCPT ); Wed, 28 Aug 2019 18:56:06 -0400 Received: by mail-pg1-f202.google.com with SMTP id t19so774135pgh.6 for ; Wed, 28 Aug 2019 15:56:06 -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=qtui76zbZDjBR4fv6nr88v7Tjsdi7Bt5xxDWhf7dUos=; b=hJ7AtSw7RjbmYX/4R+147PAQ5c/xVAItZshRqnnBzQSOhDicW/bPFv8afrFf/d1GbS IKX+9zhUwUSqUKnOptDQ7uNuRc7loUh+PoppdolKnauSOl6afFZN+rECJ4kh2E3xymtD NB76hryMlcotA7rkZtbtd4CNoL79uGkF/5gLe1WjYhStWWppuWUG8T05Q0I35bLgI8MV PwpM6hhIu4pn0Q8JYY68lIQEh2KlBXC1y3rYsrkixwfa2XZPQ9WR4f64e+fhhsMGuqEb Tr0aQAtVcRIWLZYDklwU3hnLdDaufp7pohDsNKsHn2GVExBpyrJTExR/NVUyAkr1v4KY BNRQ== 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=qtui76zbZDjBR4fv6nr88v7Tjsdi7Bt5xxDWhf7dUos=; b=UnCMZ6bPdaF61gPFjkATNdd49NuNcoebTQLICF+ZPDX+LibtK37rj/n7p2Q77+MM/k qehYiHUhfJE4DlVZhcvWUugbhWAsAsWHtyI0qSJHX2CTD2v222o+RpSFHZeYbv1kRBHS NcTkL0Y275FjS3IjR9XC0x2iTZRT5Ya3UbrJvDK+EjZfWH8aO70zjoiN7nfvPiGUxmx8 UYAmpyJoCAeBio/KDKQgqGEUr31VJu0zT86LqFGV5V3XAcim9OJ1mI1lXSIaKXM4WqHM x524ZtOdwA02RFeaxT3aFWl82Mb/tFt07ahyIspC1O6sc4v/gfFE6nfpIxicRD1K41bj 87/w== X-Gm-Message-State: APjAAAVtPX+Zh3mELsidGktvDczXTg3eaJFj4u5PV3m/A/v/Rn+jIB7a Antn9xan9drx/vFu1vzG7/Obxhq4I38XnVU4XzI= X-Received: by 2002:a63:1020:: with SMTP id f32mr5719226pgl.203.1567032965505; Wed, 28 Aug 2019 15:56:05 -0700 (PDT) Date: Wed, 28 Aug 2019 15:55:24 -0700 In-Reply-To: <20190828225535.49592-1-ndesaulniers@google.com> Message-Id: <20190828225535.49592-4-ndesaulniers@google.com> Mime-Version: 1.0 References: <20190828225535.49592-1-ndesaulniers@google.com> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog Subject: [PATCH v3 03/14] parisc: prefer __section from compiler_attributes.h From: Nick Desaulniers To: miguel.ojeda.sandonis@gmail.com Cc: sedat.dilek@gmail.com, will@kernel.org, jpoimboe@redhat.com, naveen.n.rao@linux.vnet.ibm.com, davem@davemloft.net, paul.burton@mips.com, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, Nick Desaulniers 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. Instead, we should: 1. Prefer __section(.section_name_no_quotes). 2. Only use __attribute__((__section__(".section"))) when creating the section name via C preprocessor (see the definition of __define_initcall in arch/um/include/shared/init.h). This antipattern was found with: $ grep -e __section\(\" -e __section__\(\" -r See the discussions in: Link: https://bugs.llvm.org/show_bug.cgi?id=42950 Link: https://marc.info/?l=linux-netdev&m=156412960619946&w=2 Link: https://github.com/ClangBuiltLinux/linux/issues/619 Reported-by: Sedat Dilek Suggested-by: Josh Poimboeuf Signed-off-by: Nick Desaulniers --- arch/parisc/include/asm/cache.h | 2 +- arch/parisc/include/asm/ldcw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.23.0.187.g17f5b7556c-goog diff --git a/arch/parisc/include/asm/cache.h b/arch/parisc/include/asm/cache.h index 73ca89a47f49..e5de3f897633 100644 --- a/arch/parisc/include/asm/cache.h +++ b/arch/parisc/include/asm/cache.h @@ -22,7 +22,7 @@ #define ARCH_DMA_MINALIGN L1_CACHE_BYTES -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(.data..read_mostly) void parisc_cache_init(void); /* initializes cache-flushing */ void disable_sr_hashing_asm(int); /* low level support for above */ diff --git a/arch/parisc/include/asm/ldcw.h b/arch/parisc/include/asm/ldcw.h index 3eb4bfc1fb36..e080143e79a3 100644 --- a/arch/parisc/include/asm/ldcw.h +++ b/arch/parisc/include/asm/ldcw.h @@ -52,7 +52,7 @@ }) #ifdef CONFIG_SMP -# define __lock_aligned __attribute__((__section__(".data..lock_aligned"))) +# define __lock_aligned __section(.data..lock_aligned) #endif #endif /* __PARISC_LDCW_H */