[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a4e1928-961d-43af-9951-71786b97062a@paulmck-laptop>
Date: Thu, 2 May 2024 06:33:49 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
elver@...gle.com, akpm@...ux-foundation.org, tglx@...utronix.de,
peterz@...radead.org, dianders@...omium.org, pmladek@...e.com,
arnd@...db.de, torvalds@...ux-foundation.org, kernel-team@...a.com,
Andi Shyti <andi.shyti@...ux.intel.com>,
Palmer Dabbelt <palmer@...osinc.com>,
Masami Hiramatsu <mhiramat@...nel.org>, linux-sh@...r.kernel.org
Subject: Re: [PATCH v2 cmpxchg 12/13] sh: Emulate one-byte cmpxchg
On Thu, May 02, 2024 at 07:11:52AM +0200, John Paul Adrian Glaubitz wrote:
> On Wed, 2024-05-01 at 22:06 -0700, Paul E. McKenney wrote:
> > > Does cmpxchg_emu_u8() have any advantages over the native xchg_u8()?
> >
> > That would be 8-bit xchg() rather than 8-byte cmpxchg(), correct?
>
> Indeed. I realized this after sending my reply.
No problem, as I do know that feeling!
> > Or am I missing something subtle here that makes sh also support one-byte
> > (8-bit) cmpxchg()?
>
> Is there an explanation available that explains the rationale behind the
> series, so I can learn more about it?
We have some places in mainline that need one-byte cmpxchg(), so this
series provides emulation for architectures that do not support this
notion.
> Also, I am opposed to removing Alpha entirely as it's still being actively
> maintained in Debian and Gentoo and works well.
Understood, and this sort of compatibility consideration is why this
version of this patchset does not emulate two-byte (16-bit) cmpxchg()
operations. The original (RFC) series did emulate these, which does
not work on a few architectures that do not provide 16-bit load/store
instructions, hence no 16-bit support in this series.
So this one-byte-only series affects only Alpha systems lacking
single-byte load/store instructions. If I understand correctly, Alpha
21164A (EV56) and later *do* have single-byte load/store instructions,
and thus are still just fine. In fact, it looks like EV56 also has
two-byte load/store instructions, and so would have been OK with
the original one-/two-byte RFC series.
Arnd will not be shy about correcting me if I am wrong. ;-)
> Adrian
>
> --
> .''`. John Paul Adrian Glaubitz
> : :' : Debian Developer
> `. `' Physicist
> `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Powered by blists - more mailing lists