Re: [PATCH] arm64: fix unreachable code issue with cmpxchg

From: Andrew Murray
Date: Tue Sep 10 2019 - 10:21:28 EST

On Tue, Sep 10, 2019 at 08:46:07AM +0100, Will Deacon wrote:
> On Mon, Sep 09, 2019 at 10:21:35PM +0200, Arnd Bergmann wrote:
> > On arm64 build with clang, sometimes the __cmpxchg_mb is not inlined
> Hmm. Given that CONFIG_OPTIMIZE_INLINING has also been shown to break
> assignment of local 'register' variables on GCC, perhaps we should just
> disable that option for arm64 (at least) since we don't have any toolchains
> that seem to like it very much! I'd certainly prefer that over playing
> whack-a-mole with __always_inline.

I assume we're referring to stuff such as the following?

Are these breakages limited to the out-of-line hacks made for LL/SC
atomics, or were there other breakages elsewhere?

Now that the out-of-line hacks have gone, I wonder if this is actually
still a problem anymore. In any case isn't the right thing to do there
to add the __always_inline to functions that use the register keyword
in a function currently annotated inline?

I'm happy to look into this if there is likely to be some benefit in


Andrew Murray

> Will