From patchwork Mon Aug 12 21:50:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 171129 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp76838ily; Mon, 12 Aug 2019 14:52:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqy23qYn74mz6zuA9jTKNfZiPbseRTNSQ0r1Q1qcwG6I7cp3c6mMRDjcQPJqu1uGmoqvxoHZ X-Received: by 2002:aa7:8d88:: with SMTP id i8mr38258097pfr.28.1565646761525; Mon, 12 Aug 2019 14:52:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565646761; cv=none; d=google.com; s=arc-20160816; b=dNYCa8A/RnRiY2TdwiymVCQ2mJVjKi1DDsqMiy2zzns+JS1p14+c0IKSGT+AOE2FvE cIwaaqYU5CZlCAFQUGdAcV205dRoCDpDobe4o9KfMQ0/KKDzfNAZea2LIdb+4Gq6XEOj B47aYMJe/QDTNBb0yBxcR0dV2gnxSCNkO2axYK3+Ou8VsmVJfETKzlURYlwS4SRH6zbj jou4+xsbcDtmQGlxfDgH5ziL/EcD/tlqg2i+b/Kd0Us27pcgwXwh9T4jzr/7Dj2xaQNZ abG+F19sq50N1AVTt2IW4k5uU6gwhaOp2Fu6OP7l6zStBJqUNhLKKlrltUpsr7iZTeBv 7ffA== 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=m4ddeqTw4usMPIXOPAcUPkYkUgoqsF2dwWl2Q1LfON5Nvty5oE3G3pLzPuiDpl3wMS qwtZ6LnfXZromGnQU89LMV12Ko2eIQ1QkWqYCH7r8BodxoFeQs1Jib5shLCuMAqU715f fH5WQMeQjc5sqm8ObJBYOiN7R2n6EqAdrEM5hj6rPsKLGA/va5cFefZGwc7WlVlP88Fu Rfl7K3+3qNJFI/gIfTL1YErcvseKLp6TAPYO4lBG+Ml6R15RkDpNWiRDUbGPzFHDyz4P iWn5R87gbvWMK4bjjcxxLTLqq8VjPWubNpCJMeeJVH/li9YOzCpGLz6om0fhBoUAVOzW UjSw== 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 netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 x7si17308356pga.260.2019.08.12.14.52.41; Mon, 12 Aug 2019 14:52:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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 netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 S1727937AbfHLVwk (ORCPT + 8 others); Mon, 12 Aug 2019 17:52:40 -0400 Received: from mail-pg1-f202.google.com ([209.85.215.202]:52431 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727577AbfHLVwi (ORCPT ); Mon, 12 Aug 2019 17:52:38 -0400 Received: by mail-pg1-f202.google.com with SMTP id h3so65405393pgc.19 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=thw2V53ZUDkrfRvwIcwO9UjDt3ziLSuwutlzgbe1tc0WbOoEgSK2yHsSN0ZYgp8SSU yBwt++isDeblV2d1wx8+V3edm/NJwF9jvn8bAOtcvRw4qfrcaoTwKaX1vnVbuf2Vfm16 s/ORaVoMYSC4WjiKtIRS/Bk6yWQOtRSjM9qPqiUmOrnN6et+hQWTq7uVWdjYSXtXVldp jASL9cjJhByRhfnp4u5GGxI3t0kiTi21nLkjtkubc51/gvi/zE5nYo1DpN+vN+jIgtmr OHyVk1oAJH+B3WIT9WTFEUjG7jMhjbhQvQGb4hGA7Oj5Th3fTOv28363jQTPm/lxuemf ZjCg== X-Gm-Message-State: APjAAAXB1x3YQcn4/w9M3+Iq5uX4eK5NB2DVVz2Xp7wwjV612etEvUta r6uTDiXelT5EIs4cj66npimVkqP1CY1J27Zf+xM= 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 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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(-) -- 2.23.0.rc1.153.gdeed80330f-goog 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[];