Re: arc_usr_cmpxchg and preemption
From: Max Filippov
Date: Fri Mar 16 2018 - 14:12:18 EST
> On Thu, Mar 15, 2018 at 12:03 PM, Alexey Brodkin <Alexey.Brodkin@xxxxxxxxxxxx> wrote:
> Here's a brief analysis:
> ARM: Looks like they got rid of that stuff in v4.4, see
> commit db695c0509d6 ("ARM: remove user cmpxchg syscall").
>
> M68K: That's even uglier implementation which is really asking for
> a facelift, look at sys_atomic_cmpxchg_32() here:
> https://elixir.bootlin.com/linux/latest/source/arch/m68k/kernel/sys_m68k.c#L461
>
> MIPS: They do it via special sysmips syscall which among other things
> might handle MIPS_ATOMIC_SET with mips_atomic_set()
>
> I don't immediately see if there're others but really I'm not sure if it even worth trying to
> clean-up all that since efforts might be spent pointlessly.
xtensa is another one. We used to have a buggy implementation in
arch/xtensa/kernel/entry.S:fast_syscall_xtensa which we still keep
disabled by default, just in case somebody wanted backwards
compatibility. I don't think it's worth fixing.
--
Thanks.
-- Max