[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181106144619.GB9781@hirez.programming.kicks-ass.net>
Date: Tue, 6 Nov 2018 15:46:19 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Borislav Petkov <bp@...en8.de>, namit@...are.com,
Joe Perches <joe@...ches.com>, segher@...nel.crashing.org,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC][PATCH] tree-wide: Remove __inline__ and __inline usage
On Tue, Nov 06, 2018 at 03:09:37PM +0100, Miguel Ojeda wrote:
> On Tue, Nov 6, 2018 at 11:02 AM Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > allows adding the "inline" keyword to 'asm ("")' statements. The
> > problem is that we're possibly redefining "inline" to
> > "inline __attribute__((__always_inline__))" which makes the proposed:
> >
> > asm volatile inline ("")
> >
> > (...)
> >
> > -#define inline inline
> > -#define inline inline
> > -
>
> It seems somehow your patch got underscores removed.
If you actually read what I wrote:
> > Therefore I'm proposing to run:
> >
> > git grep -l "\<__inline\(\|__\)\>" | while read file
> > do
> > sed -i -e 's/\<__inline\(\|__\)\>/inline/g' $file
> > done
> >
> > On your current tree, and apply the below fixup patch on top of that
> > result.
It makes sense.
> By the way, we have been re#defining the inline keyword since (at
> least) 2003, and already in 2008 Ingo was commenting in a commit to
> add the #ifdef to avoid it for x86. Is it still a good idea nowadays
> that the minimum compiler is quite modern compare to a decade ago? Is
> it still needed on non-x86 arches (they don't have it in the
> defconfig)? Couldn't functions be marked as __always_inline if really
> needed (as many are)?
>
> By the way (x2): CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING is only ever
> referenced in that #ifdef. May it be removed?
Dunno, but that is a far more difficult patch. The proposed one is an
obvious identify.
Powered by blists - more mailing lists