From: "Paul E. McKenney" <paulmck@kernel.org> Date: 2024-06-04 17:04:41
Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on ARM systems
with ARCH < ARMv6K.
[ paulmck: Apply Arnd Bergmann and Nathan Chancellor feedback. ]
Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/all/54798f68-48f7-4c65-9cba-47c0bf175143@sirena.org.uk/
Reported-by: Naresh Kamboju <redacted>
Closes: https://lore.kernel.org/all/CA+G9fYuZ+pf6p8AXMZWtdFtX-gbG8HMaBKp=XbxcdzA_QeLkxQ@mail.gmail.com/
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Cc: "Russell King (Oracle)" <redacted>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Davis <redacted>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Walleij <redacted>
Cc: Eric DeVolder <redacted>
Cc: Rob Herring <robh@kernel.org>
Cc: <redacted>
---
arch/arm/Kconfig | 1 +
arch/arm/include/asm/cmpxchg.h | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
Hi Paul,
thanks for your patch! This caught my eye:
On Tue, Jun 4, 2024 at 7:04 PM Paul E. McKenney [off-list ref] wrote:
Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on ARM systems
with ARCH < ARMv6K.
ARCH == ARMv6.
This ARCH < ARMv6K comes from inversion of the the a bit terse
comment for ifndef CONFIG_CPU_V6, which means "out of the
post-v6 CPUs, the following applies to those > V6".
The code in the patch, IIUC make use of cmpxchg_emu_u8()
if and only if the CPU is V6.
-#ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */
+#ifdef CONFIG_CPU_V6 /* min ARCH < ARMv6K */
This is now a set with one member so this comment should say:
/* ARCH == ARMv6 */
After this change.
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: "Paul E. McKenney" <paulmck@kernel.org> Date: 2024-06-04 21:14:06
On Tue, Jun 04, 2024 at 10:52:23PM +0200, Linus Walleij wrote:
Hi Paul,
thanks for your patch! This caught my eye:
On Tue, Jun 4, 2024 at 7:04 PM Paul E. McKenney [off-list ref] wrote:
quoted
Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on ARM systems
with ARCH < ARMv6K.
ARCH == ARMv6.
This ARCH < ARMv6K comes from inversion of the the a bit terse
comment for ifndef CONFIG_CPU_V6, which means "out of the
post-v6 CPUs, the following applies to those > V6".
The code in the patch, IIUC make use of cmpxchg_emu_u8()
if and only if the CPU is V6.
quoted
-#ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */
+#ifdef CONFIG_CPU_V6 /* min ARCH < ARMv6K */
This is now a set with one member so this comment should say:
/* ARCH == ARMv6 */
After this change.
Thank you for looking this over! Does the following patch (to be merged
into the original) capture it properly?
Thanx, Paul
------------------------------------------------------------------------
On Tue, Jun 4, 2024 at 11:14 PM Paul E. McKenney [off-list ref] wrote:
Thank you for looking this over! Does the following patch (to be merged
into the original) capture it properly?
Yup, also fix the commit message to be == CPU_V6,
with that:
Reviewed-by: Linus Walleij <redacted>
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel