From patchwork Mon Aug 12 21:50:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 171128 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp76694ily; Mon, 12 Aug 2019 14:52:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAhtWwZhxNS/ZLGLqaGi6cVRVzpyWTOsbTiLpOZSoSqHH6rwgLTPTWPzys1jw/WczMJa+d X-Received: by 2002:a62:ab0a:: with SMTP id p10mr6537971pff.144.1565646750470; Mon, 12 Aug 2019 14:52:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565646750; cv=none; d=google.com; s=arc-20160816; b=rvC214zgvvPBeaLwjhhch8+Ke+qxUqNOGbXBX7ZFfXRcs1AqbFgJ6xaSfrKoZH5Knf 4uzJYc73OuwPFS/86RSinTZG+oaPvXQ4stPAI0GhP9B7ajc5w9KVSbnSOcLQEZZ0T/i+ 0Vt8F7XutVXQ0VdJBV+s11Lqe6r0MCYZEv3+x1W2MA7HeokWTMlp8ovkEAVnp394uQwT IhFs4rE/tn3gojYQDZISAFsODLuocpzF9BTt8PR4MWa5GLsr0Tdrui7rpkHdZoUvvKVA f7XOPHkMnA9DeszJf8uYiLRGW2axwkxU4LhAYj2g9TFpyeMKEkYoMJRyEV0WTBvsBORR F1AQ== 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=2AgXEJvicJBSy/SRKWnK2/gvt/mXyTWKNhSQOzYorzg=; b=N7qjuJD8RHwx3JpQT6xWyMKXgcNHNZFd1UkMTt+v8XpIBKP9/0C0Mce7OQ1+UG4c11 5yyp1/r8gZzsY/X8IOdQxBW94qO3Gqpa9xmK9pKKn1R6CgCqVi91SatE+/8fJ93Nn+iT 3S55zKZNhw8QptmlVpYsiRxR3w5j/PWsZ4q92X8dWsGojNlocXmawOXTVSI89StxfMac cUrelaR6px0bKcX47WG9RfvHsimwh2EVv1/pcjR4DIMsKhFjJbfeShOfRnOIy5pAjNaF OCemhRB6U8ERSOrf6om4GWODDjVuGu3vaak3U0/2arJ6Z7xW1kRqE/22vGpSe/JokPfs QZ1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=QD2Q9TVx; 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 x7si17308356pga.260.2019.08.12.14.52.30; Mon, 12 Aug 2019 14:52:30 -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=QD2Q9TVx; 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 S1727911AbfHLVw2 (ORCPT + 28 others); Mon, 12 Aug 2019 17:52:28 -0400 Received: from mail-vs1-f74.google.com ([209.85.217.74]:34879 "EHLO mail-vs1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727029AbfHLVw0 (ORCPT ); Mon, 12 Aug 2019 17:52:26 -0400 Received: by mail-vs1-f74.google.com with SMTP id 66so23006763vsp.2 for ; Mon, 12 Aug 2019 14:52:26 -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=2AgXEJvicJBSy/SRKWnK2/gvt/mXyTWKNhSQOzYorzg=; b=QD2Q9TVxotj25Bb1ouljTvMCvR83QJDYk2233b6aDf5UyAOc4+c3u0nYzqK2HiP9Jd mWjfm3fF7X8BxISaaea7HPxbpoGJAkgRdVmpjYKrjmNuH3MarsX7MS4wsNBe6G8n6f36 n47LxqcnSGzw6RtyrzlLPb+EQoVzrvthsOmuGkhCqDIEAEO62T+Ih/9XGutE8xHgaxex niw/b9YZcCQAxTuG+nGc6XTtMhuRJ36Q9JkIWVX4S93KEdLzIXq0UIzJZCfKPIBEyf5h yv65GUdyh/ZiBeRFUstxqphaAC9yA1yaTYOoX+hpm1aZ4CwSO39oD+vxLn1QJTqzYfuB H22A== 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=2AgXEJvicJBSy/SRKWnK2/gvt/mXyTWKNhSQOzYorzg=; b=U2C1hf+gvl61eTe4/PAL9EHTRkenbWCpbGwft3IqhTDuoFyfPOmRH4CX5mgQmn74Ph dvI1GceEzUlLYD+JKAkOxvdvGxOl/3asSFgRMj6sxJ/hrdJZwSZsANzmpg6UQbXEdF0k 9CyDy3aWFqWDJgk842fpJqArFB6R4W6B7LH7TCNFFF2yUu/fpW/nwmDlOBWyEZGAlG/W OmKoY8QDJeCFmmfyfWe8Ys2y07x+LgS9WMB2E7903QHrlSvAqRot9vaxceqLm3ug4eDI bgGidDB6FayKdqjDIQSaOju103vR9/ieHNDgsd0zghg6fnu+EBEOOuQsc9qMAyP1vecs uZiA== X-Gm-Message-State: APjAAAX8l3wenCde6bshgS03IdIlMuEeF2XBlQeOx3zXcVR30Z4MpO4n IwaGuGdm2zQC/V0iU+NOBxBz3pzYwGBE4irm5N4= X-Received: by 2002:a67:e447:: with SMTP id n7mr10737492vsm.115.1565646745461; Mon, 12 Aug 2019 14:52:25 -0700 (PDT) Date: Mon, 12 Aug 2019 14:50:43 -0700 In-Reply-To: <20190812215052.71840-1-ndesaulniers@google.com> Message-Id: <20190812215052.71840-10-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 10/16] powerpc: prefer __section and __printf 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 , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Geoff Levand , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Allison Randal , Thomas Gleixner , Greg Kroah-Hartman , Christophe Leroy , Rob Herring , linuxppc-dev@lists.ozlabs.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 Reported-by: Sedat Dilek Suggested-by: Josh Poimboeuf Signed-off-by: Nick Desaulniers --- arch/powerpc/boot/main.c | 3 +-- arch/powerpc/boot/ps3.c | 6 ++---- arch/powerpc/include/asm/cache.h | 2 +- arch/powerpc/kernel/btext.c | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) -- 2.23.0.rc1.153.gdeed80330f-goog diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 102cc546444d..3ccc84e06fc4 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c @@ -150,8 +150,7 @@ static struct addr_range prep_initrd(struct addr_range vmlinux, void *chosen, * edit the command line passed to vmlinux (by setting /chosen/bootargs). * The buffer is put in it's own section so that tools may locate it easier. */ -static char cmdline[BOOT_COMMAND_LINE_SIZE] - __attribute__((__section__("__builtin_cmdline"))); +static char cmdline[BOOT_COMMAND_LINE_SIZE] __section(__builtin_cmdline); static void prep_cmdline(void *chosen) { diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c index c52552a681c5..70b2ed82d2de 100644 --- a/arch/powerpc/boot/ps3.c +++ b/arch/powerpc/boot/ps3.c @@ -24,8 +24,7 @@ extern int lv1_get_repository_node_value(u64 in_1, u64 in_2, u64 in_3, #ifdef DEBUG #define DBG(fmt...) printf(fmt) #else -static inline int __attribute__ ((format (printf, 1, 2))) DBG( - const char *fmt, ...) {return 0;} +static inline int __printf(1, 2) DBG(const char *fmt, ...) { return 0; } #endif BSS_STACK(4096); @@ -35,8 +34,7 @@ BSS_STACK(4096); * The buffer is put in it's own section so that tools may locate it easier. */ -static char cmdline[BOOT_COMMAND_LINE_SIZE] - __attribute__((__section__("__builtin_cmdline"))); +static char cmdline[BOOT_COMMAND_LINE_SIZE] __section(__builtin_cmdline); static void prep_cmdline(void *chosen) { diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index 45e3137ccd71..9114495855eb 100644 --- a/arch/powerpc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h @@ -91,7 +91,7 @@ static inline u32 l1_cache_bytes(void) isync #else -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(.data..read_mostly) #ifdef CONFIG_PPC_BOOK3S_32 extern long _get_L2CR(void); diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c index 6dfceaa820e4..f57712a55815 100644 --- a/arch/powerpc/kernel/btext.c +++ b/arch/powerpc/kernel/btext.c @@ -26,7 +26,7 @@ static void scrollscreen(void); #endif -#define __force_data __attribute__((__section__(".data"))) +#define __force_data __section(.data) static int g_loc_X __force_data; static int g_loc_Y __force_data;