Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-20 Thread Guo Ren
Hi Arnd, On Mon, Dec 21, 2020 at 1:49 AM Arnd Bergmann wrote: > > On Sun, Dec 20, 2020 at 4:46 PM Guo Ren wrote: > > On Tue, Dec 15, 2020 at 7:26 PM Arnd Bergmann wrote: > > > > > > On Tue, Dec 15, 2020 at 7:09 AM Guo Ren wrote: > > > > On Mon, Dec 14, 2020 at 9:15 PM Arnd Bergmann wrote: >

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-20 Thread Arnd Bergmann
On Sun, Dec 20, 2020 at 4:46 PM Guo Ren wrote: > On Tue, Dec 15, 2020 at 7:26 PM Arnd Bergmann wrote: > > > > On Tue, Dec 15, 2020 at 7:09 AM Guo Ren wrote: > > > On Mon, Dec 14, 2020 at 9:15 PM Arnd Bergmann wrote: > > > > I had a look at what other architectures always implement > > > >

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-20 Thread Guo Ren
Hi Arnd, On Tue, Dec 15, 2020 at 7:26 PM Arnd Bergmann wrote: > > On Tue, Dec 15, 2020 at 7:09 AM Guo Ren wrote: > > On Mon, Dec 14, 2020 at 9:15 PM Arnd Bergmann wrote: > > > I had a look at what other architectures always implement > > > futex_atomic_cmpxchg_inatomic() or can use the

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-18 Thread Andreas Larsson
On 2020-12-17 17:43, Arnd Bergmann wrote: It does make sense to require that a single kernel can work on all possible hardware. So if we remove sun4m/sun4d support, all that is left is LEON, and you likely wouldn't need to worry about other CPUs any more. However, there is still the question

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-17 Thread Sam Ravnborg
Hi Arnd, > > I think we would be better served dropping support for sun4m and sun4d > > from the kernel. > > This seems appropriate as well to me. I did a quick hack: 20 files changed, 40 insertions(+), 3051 deletions(-) All the leon stuff is kept and there is room for more cleaning up. The

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-17 Thread Arnd Bergmann
On Thu, Dec 17, 2020 at 4:32 PM Andreas Larsson wrote: > On 2020-12-16 00:24, Arnd Bergmann wrote: > > On Tue, Dec 15, 2020 at 8:38 PM Sam Ravnborg wrote: > >> On Tue, Dec 15, 2020 at 12:26:10PM +0100, Arnd Bergmann wrote: > >>> > >>> - Disable SMP support for sun4m/sun4d. From the historic git

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-17 Thread Andreas Larsson
On 2020-12-16 00:24, Arnd Bergmann wrote: On Tue, Dec 15, 2020 at 8:38 PM Sam Ravnborg wrote: On Tue, Dec 15, 2020 at 12:26:10PM +0100, Arnd Bergmann wrote: - Disable SMP support for sun4m/sun4d. From the historic git tree, it's unclear how well this ever worked, and very few machines

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-16 Thread Peter Zijlstra
On Tue, Dec 15, 2020 at 12:26:10PM +0100, Arnd Bergmann wrote: > On Tue, Dec 15, 2020 at 7:09 AM Guo Ren wrote: > > On Mon, Dec 14, 2020 at 9:15 PM Arnd Bergmann wrote: > > > I had a look at what other architectures always implement > > > futex_atomic_cmpxchg_inatomic() or can use the

RE: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-16 Thread David Laight
From: Sam Ravnborg > Sent: 15 December 2020 19:38 > > Hi Arnd, > > On Tue, Dec 15, 2020 at 12:26:10PM +0100, Arnd Bergmann wrote: > > On Tue, Dec 15, 2020 at 7:09 AM Guo Ren wrote: ... > > - Disable SMP support for sun4m/sun4d. From the historic git > > tree, it's unclear how well this ever

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-15 Thread Arnd Bergmann
On Tue, Dec 15, 2020 at 8:38 PM Sam Ravnborg wrote: > On Tue, Dec 15, 2020 at 12:26:10PM +0100, Arnd Bergmann wrote: > > > > - Disable SMP support for sun4m/sun4d. From the historic git > > tree, it's unclear how well this ever worked, and very few machines > > of this class ever existed >

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-15 Thread Sam Ravnborg
Hi Arnd, On Tue, Dec 15, 2020 at 12:26:10PM +0100, Arnd Bergmann wrote: > On Tue, Dec 15, 2020 at 7:09 AM Guo Ren wrote: > > On Mon, Dec 14, 2020 at 9:15 PM Arnd Bergmann wrote: > > > I had a look at what other architectures always implement > > > futex_atomic_cmpxchg_inatomic() or can use the

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-15 Thread Arnd Bergmann
On Tue, Dec 15, 2020 at 7:09 AM Guo Ren wrote: > On Mon, Dec 14, 2020 at 9:15 PM Arnd Bergmann wrote: > > I had a look at what other architectures always implement > > futex_atomic_cmpxchg_inatomic() or can use the asm-generic non-SMP version, > > and I found that it's pretty much all of them,

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-14 Thread Guo Ren
Hi Arnd, On Mon, Dec 14, 2020 at 9:15 PM Arnd Bergmann wrote: > > On Sat, Dec 12, 2020 at 9:01 PM Thomas Gleixner wrote: > > > > On Sat, Dec 12 2020 at 13:26, Marco Elver wrote: > > > On Thu, Mar 07, 2019 at 10:14AM +0100, Arnd Bergmann wrote: > > >> -static void __init

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-14 Thread Arnd Bergmann
On Sat, Dec 12, 2020 at 9:01 PM Thomas Gleixner wrote: > > On Sat, Dec 12 2020 at 13:26, Marco Elver wrote: > > On Thu, Mar 07, 2019 at 10:14AM +0100, Arnd Bergmann wrote: > >> -static void __init futex_detect_cmpxchg(void) > >> +static noinline void futex_detect_cmpxchg(void) > >> { > >>

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-14 Thread Marco Elver
On Sat, Dec 12, 2020 at 09:01PM +0100, Thomas Gleixner wrote: > On Sat, Dec 12 2020 at 13:26, Marco Elver wrote: > > On Thu, Mar 07, 2019 at 10:14AM +0100, Arnd Bergmann wrote: > >> -static void __init futex_detect_cmpxchg(void) > >> +static noinline void futex_detect_cmpxchg(void) > >> { > >>

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-12 Thread Thomas Gleixner
On Sat, Dec 12 2020 at 13:26, Marco Elver wrote: > On Thu, Mar 07, 2019 at 10:14AM +0100, Arnd Bergmann wrote: >> -static void __init futex_detect_cmpxchg(void) >> +static noinline void futex_detect_cmpxchg(void) >> { >> #ifndef CONFIG_HAVE_FUTEX_CMPXCHG >> u32 curval; > > What ever

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2019-03-07 Thread Arnd Bergmann
On Thu, Mar 7, 2019 at 7:21 PM Nathan Chancellor wrote: > > On Thu, Mar 07, 2019 at 10:12:11AM -0800, Nick Desaulniers wrote: > > On Thu, Mar 7, 2019 at 1:15 AM Arnd Bergmann wrote: > > > > > > On 32-bit ARM, I got a link failure in futex_init() when building > > > with clang in some random

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2019-03-07 Thread Nathan Chancellor
On Thu, Mar 07, 2019 at 10:12:11AM -0800, Nick Desaulniers wrote: > On Thu, Mar 7, 2019 at 1:15 AM Arnd Bergmann wrote: > > > > On 32-bit ARM, I got a link failure in futex_init() when building > > with clang in some random configurations: > > > > kernel/futex.o:(.text.fixup+0x5c): relocation

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2019-03-07 Thread Nick Desaulniers
On Thu, Mar 7, 2019 at 1:15 AM Arnd Bergmann wrote: > > On 32-bit ARM, I got a link failure in futex_init() when building > with clang in some random configurations: > > kernel/futex.o:(.text.fixup+0x5c): relocation truncated to fit: R_ARM_JUMP24 > against `.init.text' Do we know what function

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2019-03-07 Thread Russell King - ARM Linux admin
On Thu, Mar 07, 2019 at 09:42:40AM -0800, Joe Perches wrote: > On Thu, 2019-03-07 at 17:25 +, Russell King - ARM Linux admin wrote: > > On Thu, Mar 07, 2019 at 09:19:04AM -0800, Joe Perches wrote: > > > On Thu, 2019-03-07 at 10:14 +0100, Arnd Bergmann wrote: > > > > On 32-bit ARM, I got a link

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2019-03-07 Thread Joe Perches
On Thu, 2019-03-07 at 17:25 +, Russell King - ARM Linux admin wrote: > On Thu, Mar 07, 2019 at 09:19:04AM -0800, Joe Perches wrote: > > On Thu, 2019-03-07 at 10:14 +0100, Arnd Bergmann wrote: > > > On 32-bit ARM, I got a link failure in futex_init() when building > > > with clang in some

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2019-03-07 Thread Russell King - ARM Linux admin
On Thu, Mar 07, 2019 at 09:19:04AM -0800, Joe Perches wrote: > On Thu, 2019-03-07 at 10:14 +0100, Arnd Bergmann wrote: > > On 32-bit ARM, I got a link failure in futex_init() when building > > with clang in some random configurations: > > > > kernel/futex.o:(.text.fixup+0x5c): relocation

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2019-03-07 Thread Joe Perches
On Thu, 2019-03-07 at 10:14 +0100, Arnd Bergmann wrote: > On 32-bit ARM, I got a link failure in futex_init() when building > with clang in some random configurations: > > kernel/futex.o:(.text.fixup+0x5c): relocation truncated to fit: R_ARM_JUMP24 > against `.init.text' > > As far as I can

[PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2019-03-07 Thread Arnd Bergmann
On 32-bit ARM, I got a link failure in futex_init() when building with clang in some random configurations: kernel/futex.o:(.text.fixup+0x5c): relocation truncated to fit: R_ARM_JUMP24 against `.init.text' As far as I can tell, the problem is that a branch is over 16MB apart in those