[PATCH v2] ARM: asid: Do not replace active_asids if already 0

Karl Mehltretter kmehltretter at gmail.com
Wed Aug 26 20:56:21 PDT 2026


On Sun, Aug 09, 2026 at 08:06:00PM +0100, Karl Mehltretter wrote:
> This patch changes the xchg to cmpxchg so that the active_asids is only
> updated if non-zero to avoid a race with an ASID roll-over on a
> different CPU.
> 
> Cc: Russell King <linux at armlinux.org.uk>
> Cc: Will Deacon <will at kernel.org>
> Signed-off-by: Catalin Marinas <catalin.marinas at arm.com>
> Tested-by: Karl Mehltretter <kmehltretter at gmail.com>
> Signed-off-by: Karl Mehltretter <kmehltretter at gmail.com>
> ---
> This is similar to the arm64 patch [1], with the difference that
> non-relaxed (cmp)xchg is used as in the existing ARM code.
> 
> This is a resubmission of Catalin Marinas' original 2018 patch. The
> original submission was not merged, and the ARM32 equivalent of the arm64
> ASID rollover fix remains missing.
> 

Just a friendly ping in case this got missed.

Thanks,
Karl



More information about the linux-arm-kernel mailing list