]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: Avoid eager DVMSync reclaim batches with C1-Pro SME erratum
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 10 Jun 2026 10:37:16 +0000 (11:37 +0100)
committerWill Deacon <will@kernel.org>
Mon, 29 Jun 2026 11:00:37 +0000 (12:00 +0100)
commit534eb6940a89ff7ca3f2ab6582f3548ca97674c3
tree32e6aa933309354c986ef244386ba6ff68d69073
parentf9a82544c7174851f5c7524622f5966dcafd3a47
arm64: Avoid eager DVMSync reclaim batches with C1-Pro SME erratum

The C1-Pro SME DVMSync workaround currently samples mm_cpumask() from
arch_tlbbatch_add_pending(). It requires a DSB after every batched TLBI
so that the mask read is ordered after the hardware DVMSync, defeating
much of the reclaim batching benefit.

Introduce the sme_active_cpus mask tracking which CPUs run in user-space
with SME enabled and use it for batch flushing instead of accumulating
the mm_cpumask() of the unmapped pages.

Fixes: 0baba94a9779 ("arm64: errata: Work around early CME DVMSync acknowledgement")
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Tested-by: Joshua Liu <josliu@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/tlbbatch.h
arch/arm64/include/asm/tlbflush.h
arch/arm64/kernel/fpsimd.c
arch/arm64/kernel/process.c