| Date | Fri, 18 Jun 2021 09:48:47 +0100 | From | Mark Rutland <> | Subject | Re: [PATCH v2 00/33] locking/atomic: convert all architectures to ARCH_ATOMIC |
| |
On Fri, Jun 04, 2021 at 10:56:16PM -0700, Randy Dunlap wrote: > On 5/25/21 7:01 AM, Mark Rutland wrote: > > This series (based on v5.13-rc2) converts all architectures to > > ARCH_ATOMIC. This will allow the use of instrumented atomics on all > > architectures (e.g. for KASAN and similar), and simplifies the core > > atomic code (which should allow for easier rework of the fallbacks and > > other bits in future).
[...]
> Hi Mark, > Sorry for the late reply.
Hi Randy,
Likewise, apologies in the delay in getting to this!
> I was just trying to update a patch > to arch/sh/include/asm/cmpxchg.h, in its xchg() macro: > > https://lore.kernel.org/lkml/20210602231443.4670-2-rdunlap@infradead.org/ > > The patch simply converts xchg() to a GCC statement expression to > eliminate a build warning. > > Arnd has done this for m68k and I have done it for sparc in the past. > > Is there any (good) reason that all versions of arch_xchg() are not > statement expressions? In this patch series, they seem to be quite > mixed (as they were before this patch series). I count 11 arches > that use a statement expression and 4 that do not (including arch/sh/).
Largely I tried to make the minimal change from what was there before, and I didn't have any specific reason to either use or avoid statement expressions.
This series has been queued in the tip tree's locking/core branch for a while now, but we could spin a patch atop. Do you want to spin a patch to convert the remaining 4 architectures in one go?
Thanks, Mark.
|