All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Sedat Dilek <sedat.dilek@gmail.com>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Kees Cook <keescook@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>,
	rcu@vger.kernel.org,
	Clang-Built-Linux ML <clang-built-linux@googlegroups.com>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
Date: Wed, 30 Sep 2020 15:06:51 -0700	[thread overview]
Message-ID: <417ffa3fd3fba5d4a481db6a0b0c9b48cbbb17c4.camel@perches.com> (raw)
In-Reply-To: <CAKwvOdkhyvTpY6pHT+CLSsBFuKRWsXucjbwN_tyJAsryZXvG1A@mail.gmail.com>

On Wed, 2020-09-30 at 14:40 -0700, Nick Desaulniers wrote:
> On Wed, Sep 30, 2020 at 12:16 PM Joe Perches <joe@perches.com> wrote:
> > Use a more generic form for __section that requires quotes to avoid
> > complications with clang and gcc differences.
> > 
> > Remove the quote operator # from compiler_attributes.h __section macro.
> > 
> > Convert all unquoted __section(foo) uses to quoted __section("foo").
> > Also convert __attribute__((section("foo"))) uses to __section("foo")
> > even if the __attribute__ has multiple list entry forms.
> > 
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> > 
> > This is the current output from the script against next-20200930
> > attached in this link:
> > 
> > https://lore.kernel.org/lkml/0e582a7f5144a33f465978d97701f9b3dcc377f3.camel@perches.com/
> > 
> > It might be useful to run the script immediately before
> > the next -rc1.
> 
> $ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71
> powernv_defconfig
> $ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71
> ...
> arch/powerpc/boot/main.c:193:44: error: expected ';' after top level declarator
> static char cmdline[BOOT_COMMAND_LINE_SIZE]

The script does not convert files in

	scripts/
	tools/
	uapi/
	and include/linux/compiler_attributes.h

It otherwise assumes that any __attribute__((__section__
use should be converted to __section.

If this ppc file is the only file outside of the
listed exclusions, I can either exclude it directly
or add compiler.h to it.

You have a preference?

Perhaps these are also possible files that need exclusions:

./arch/x86/boot/video.h:#define __videocard struct card_info __section(".videocards") __attribute__((used))
./arch/x86/boot/compressed/pgtable_64.c:unsigned long *trampoline_32bit __section(".data");
./arch/x86/boot/tty.c:static void __section(".inittext") serial_putchar(int ch)
./arch/x86/boot/tty.c:static void __section(".inittext") bios_putchar(int ch)
./arch/x86/boot/tty.c:void __section(".inittext") putchar(int ch)
./arch/x86/boot/tty.c:void __section(".inittext") puts(const char *str)
./arch/s390/boot/startup.c:static struct diag210 _diag210_tmp_dma __section(".dma.data");
./arch/powerpc/boot/main.c:	__section("__builtin_cmdline");
./arch/powerpc/boot/ps3.c:	__section("__builtin_cmdline");



  reply	other threads:[~2020-09-30 22:06 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 19:22 [PATCH] srcu: avoid escaped section names Nick Desaulniers
2020-09-29 19:22 ` Nick Desaulniers
2020-09-29 19:25   ` [PATCH v2] " Nick Desaulniers
2020-09-29 23:45     ` Kees Cook
2020-09-30 16:27     ` Nathan Chancellor
2020-09-30 16:41     ` Sedat Dilek
2020-09-30 18:57       ` Joe Perches
2020-09-30 19:16         ` [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo") Joe Perches
2020-09-30 21:40           ` Nick Desaulniers
2020-09-30 22:06             ` Joe Perches [this message]
2020-09-30 22:12               ` Joe Perches
2020-09-30 22:20               ` Nick Desaulniers
2020-09-30 22:25                 ` Joe Perches
2020-09-30 22:56                   ` Joe Perches
2020-10-01 10:15                     ` Miguel Ojeda
2020-10-01 10:15                       ` Miguel Ojeda
2020-10-01 19:05                       ` Joe Perches
2020-10-01 19:05                         ` Joe Perches
2020-10-01 19:39                       ` Segher Boessenkool
2020-10-01 19:39                         ` Segher Boessenkool
2020-10-01 20:19                         ` Joe Perches
2020-10-05 18:36                           ` Nick Desaulniers
2020-10-05 18:36                             ` Nick Desaulniers
2020-10-05 18:46                             ` Joe Perches
2020-10-05 18:46                               ` Joe Perches
2020-10-06  0:34                           ` Joel Stanley
2020-10-06  0:34                             ` Joel Stanley
2020-10-06  3:22                             ` Joe Perches
2020-10-06  3:22                               ` Joe Perches
2020-09-30 20:40     ` [PATCH v2] srcu: avoid escaped section names Paul E. McKenney
2020-09-30 20:55       ` Nick Desaulniers
2020-10-02 20:51         ` Paul E. McKenney
2020-10-05 18:29           ` Nick Desaulniers
2020-10-05 18:38             ` Sedat Dilek
2020-10-05 18:49               ` Paul E. McKenney
2020-10-06  6:56                 ` Nathan Chancellor
2020-10-07 21:05                   ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=417ffa3fd3fba5d4a481db6a0b0c9b48cbbb17c4.camel@perches.com \
    --to=joe@perches.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=mpe@ellerman.id.au \
    --cc=ndesaulniers@google.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sedat.dilek@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.