Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 7489/1: errata: fix workaround for erratum #720789 on UP systems

Commit 5a783cbc4836 ("ARM: 7478/1: errata: extend workaround for erratum
#720789") added workarounds for erratum #720789 to the range TLB
invalidation functions with the observation that the erratum only
affects SMP platforms. However, when running an SMP_ON_UP kernel on a
uniprocessor platform we must take care to preserve the ASID as the
workaround is not required.

This patch ensures that we don't set the ASID to 0 when flushing the TLB
on such a system, preserving the original behaviour with the workaround
disabled.

Cc: <stable@vger.kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Will Deacon and committed by
Russell King
730a8128 f5f2025e

+3 -3
+3 -3
arch/arm/mm/tlb-v7.S
··· 38 38 dsb 39 39 mov r0, r0, lsr #PAGE_SHIFT @ align address 40 40 mov r1, r1, lsr #PAGE_SHIFT 41 - #ifdef CONFIG_ARM_ERRATA_720789 42 - mov r3, #0 43 - #else 44 41 asid r3, r3 @ mask ASID 42 + #ifdef CONFIG_ARM_ERRATA_720789 43 + ALT_SMP(W(mov) r3, #0 ) 44 + ALT_UP(W(nop) ) 45 45 #endif 46 46 orr r0, r3, r0, lsl #PAGE_SHIFT @ Create initial MVA 47 47 mov r1, r1, lsl #PAGE_SHIFT