Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp228607ybl; Mon, 12 Aug 2019 15:11:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXeNAITbMcQ/FGTicS0jhIgvbyNdKfo+LcfHbhcoLZvh/QzxB7tTAplZaAYTeny5aFkshs X-Received: by 2002:a17:902:900a:: with SMTP id a10mr35592030plp.281.1565647873741; Mon, 12 Aug 2019 15:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565647873; cv=none; d=google.com; s=arc-20160816; b=gDxC0+js7zJEnT0I+QQEK4Qf3jpW1wQAlrc37iI+vNrN2mV9umvHt5g9c8gatEnE7R Br3bbhFOKNxEdyr7knMSV1bCEFkAy0qst22+JeWmH1EMwhzrTu4fU654yAd1Bu5jDYjx v5wstfOnQVSoMzd4WFgiw+xd2T5jIKEDtd7kaEsvXXpw7KF9pVtzqKi2WlXIHJHC7CMK FhUPwVZJQDMawyH/4Kg3WZcRDckVjOpsxRzjAz/XcpJY4J05AP/xMruHpE2YWZr7DX+j hjCYbcIcYBD2rnsvM2IMSZS1+90z72ZYCPiEW21pi2qB976jiYWSSLDrPEO0tnb8b2z9 Ugiw== 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=nhdP3qLGadfkBXXgzu2XRajPFFK4fSn/Au7TvOHqv+g=; b=wyP1KfoV+Zu3s0qWiJ5NdI1fybzo/tmMGLxK4/kcedz/rwR0iQmY6ilXA/st1VbG6i cOMqOXF39oeHFxjjPNk99u3lQ/2gT9s5SMHNA9EioFaQtZmwYGWdCpei6RjjdB+tuVD7 gDwQLCp7f0MEC8goJI1xOX+8KKYdNZ0/UD9FB6gmnzzgT4Jt2LgBbpudQplsDpTnJyMR X4XBmJAr9Co1WqYkkn35RGlPB4E4lh+SGvGuPlFQevFLYsH8whv3o2RZjoqy4sCrhzZ0 NcWVHRDVidy31OjhabTLTlMk8JzOAUWjeqE1ui/AzVjL3JZBR7wDeo/kI954AwFxcd5f 5a2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=l0vrvwIH; 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 b35si59040935plb.249.2019.08.12.15.10.57; Mon, 12 Aug 2019 15:11:13 -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=l0vrvwIH; 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 S1727577AbfHLVwl (ORCPT + 99 others); Mon, 12 Aug 2019 17:52:41 -0400 Received: from mail-pg1-f202.google.com ([209.85.215.202]:45515 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727927AbfHLVwi (ORCPT ); Mon, 12 Aug 2019 17:52:38 -0400 Received: by mail-pg1-f202.google.com with SMTP id 28so14880623pgm.12 for ; Mon, 12 Aug 2019 14:52:38 -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=nhdP3qLGadfkBXXgzu2XRajPFFK4fSn/Au7TvOHqv+g=; b=l0vrvwIHmSzOktb7Rq3EdrK6pdsP3Ma3RCqx5BQ6NP0yweIZWAU2Q/lHhoKvWSxp6n hb/8hiCQkymuV+MMOHey9h69MdrERLD0hZ/gfrxdEVFUhiSHtWnAoQhOg6NXS1/OG/rA 9o28P2Qois3wr22QlsgANra7Ffshp6GNOzF/SQl3ww6PwmpI9RZSp1Zd+eSsUyOy8Xh9 8/gU6pTbRK5x5aBYeVeLkGgRxNa6mKkBFuZUTSejia6ABf36q3l92lLkASTPqArWoGUx FVz/lju2Dg6bsdjVY2St8Tc9hDr5mfAQ/LOxOKiurkoCnULUdwHJkriMSFsS0OH/LIWd 78Vg== 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=nhdP3qLGadfkBXXgzu2XRajPFFK4fSn/Au7TvOHqv+g=; b=HRgX3B6GT3uCSAz3H6HagRS88S/bkCMd7aqVJOwgG74BfIgalSY6wNf6XlIqBqYGhw EY/qrObhVpX5+zSfLFNrArfEpjV7Wahu3CSje6AmTRPnXHL+22AZBWHeZfR+ONLP9zhs jvX0FWt65zYDBNdL2sbt8Z89N9I123JCR8IeALJnnTSjbc8nOXgpp5wJa+lUg9YWUg0l /mkdt+Cix4JEckGu4r1pBP89pvMywNBM5u3Bs/5ntbeFpuxIwc/iVOBQym0mmmdyAeKU H/4RwlXGE1gs/EnmaAZ71pxMEu1SEetCd6+Y/bAB5czWC1qVQtJ4Fqy1/3wKRgMYFO67 52dg== X-Gm-Message-State: APjAAAUXW1QqlMsr4rJW5HAlPGu0fXyF9VLhEdLbsIxFO3XD7GSfqRTn L5oRP0ci2a2MzkTvljnZvVgiaF+djo4HkIuyMwo= X-Received: by 2002:a65:6406:: with SMTP id a6mr26645041pgv.393.1565646757703; Mon, 12 Aug 2019 14:52:37 -0700 (PDT) Date: Mon, 12 Aug 2019 14:50:44 -0700 In-Reply-To: <20190812215052.71840-1-ndesaulniers@google.com> Message-Id: <20190812215052.71840-11-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 11/16] x86: 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 , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Armijn Hemel , Greg Kroah-Hartman , Allison Randal , Juergen Gross , Frederic Weisbecker , Brijesh Singh , Enrico Weigelt , Kate Stewart , Hannes Reinecke , Sean Christopherson , "Rafael J. Wysocki" , Pu Wen , 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 Reported-by: Sedat Dilek Suggested-by: Josh Poimboeuf Signed-off-by: Nick Desaulniers --- arch/x86/include/asm/cache.h | 2 +- arch/x86/include/asm/intel-mid.h | 2 +- arch/x86/include/asm/iommu_table.h | 5 ++--- arch/x86/include/asm/irqflags.h | 2 +- arch/x86/include/asm/mem_encrypt.h | 2 +- arch/x86/kernel/cpu/cpu.h | 3 +-- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/x86/include/asm/cache.h b/arch/x86/include/asm/cache.h index abe08690a887..bb9f4bf4ec02 100644 --- a/arch/x86/include/asm/cache.h +++ b/arch/x86/include/asm/cache.h @@ -8,7 +8,7 @@ #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(.data..read_mostly) #define INTERNODE_CACHE_SHIFT CONFIG_X86_INTERNODE_CACHE_SHIFT #define INTERNODE_CACHE_BYTES (1 << INTERNODE_CACHE_SHIFT) diff --git a/arch/x86/include/asm/intel-mid.h b/arch/x86/include/asm/intel-mid.h index 8e5af119dc2d..f51f04aefe1b 100644 --- a/arch/x86/include/asm/intel-mid.h +++ b/arch/x86/include/asm/intel-mid.h @@ -43,7 +43,7 @@ struct devs_id { #define sfi_device(i) \ static const struct devs_id *const __intel_mid_sfi_##i##_dev __used \ - __attribute__((__section__(".x86_intel_mid_dev.init"))) = &i + __section(.x86_intel_mid_dev.init) = &i /** * struct mid_sd_board_info - template for SD device creation diff --git a/arch/x86/include/asm/iommu_table.h b/arch/x86/include/asm/iommu_table.h index 1fb3fd1a83c2..7d190710eb92 100644 --- a/arch/x86/include/asm/iommu_table.h +++ b/arch/x86/include/asm/iommu_table.h @@ -50,9 +50,8 @@ struct iommu_table_entry { #define __IOMMU_INIT(_detect, _depend, _early_init, _late_init, _finish)\ static const struct iommu_table_entry \ - __iommu_entry_##_detect __used \ - __attribute__ ((unused, __section__(".iommu_table"), \ - aligned((sizeof(void *))))) \ + __iommu_entry_##_detect __used __section(.iommu_table) \ + __aligned((sizeof(void *))) \ = {_detect, _depend, _early_init, _late_init, \ _finish ? IOMMU_FINISH_IF_DETECTED : 0} /* diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h index 8a0e56e1dcc9..68db90bca813 100644 --- a/arch/x86/include/asm/irqflags.h +++ b/arch/x86/include/asm/irqflags.h @@ -9,7 +9,7 @@ #include /* Provide __cpuidle; we can't safely include */ -#define __cpuidle __attribute__((__section__(".cpuidle.text"))) +#define __cpuidle __section(.cpuidle.text) /* * Interrupt control: diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h index 0c196c47d621..db2cd3709148 100644 --- a/arch/x86/include/asm/mem_encrypt.h +++ b/arch/x86/include/asm/mem_encrypt.h @@ -50,7 +50,7 @@ void __init mem_encrypt_free_decrypted_mem(void); bool sme_active(void); bool sev_active(void); -#define __bss_decrypted __attribute__((__section__(".bss..decrypted"))) +#define __bss_decrypted __section(.bss..decrypted) #else /* !CONFIG_AMD_MEM_ENCRYPT */ diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h index c0e2407abdd6..7ff9dc41a603 100644 --- a/arch/x86/kernel/cpu/cpu.h +++ b/arch/x86/kernel/cpu/cpu.h @@ -38,8 +38,7 @@ struct _tlb_table { #define cpu_dev_register(cpu_devX) \ static const struct cpu_dev *const __cpu_dev_##cpu_devX __used \ - __attribute__((__section__(".x86_cpu_dev.init"))) = \ - &cpu_devX; + __section(.x86_cpu_dev.init) = &cpu_devX; extern const struct cpu_dev *const __x86_cpu_dev_start[], *const __x86_cpu_dev_end[]; -- 2.23.0.rc1.153.gdeed80330f-goog