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

ARM: 8236/1: mm: fix discard_old_kernel_data

L1_CACHE_BYTES could be larger value than real L1 cache line size.
In that case, discard_old_kernel_data() would omit to invalidate
last bytes as much as L1_CACHE_BYTES - real cache line size.

So fix end address to "to + PAGE_SIZE -1". The bottom bits
of the address is LINELEN. that is ignored by mcrr.

Signed-off-by: Jungseung Lee <js07.lee@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Jungseung Lee and committed by
Russell King
80231874 1d4d3715

+1 -1
+1 -1
arch/arm/mm/copypage-v6.c
··· 62 62 __asm__("mcrr p15, 0, %1, %0, c6 @ 0xec401f06" 63 63 : 64 64 : "r" (kto), 65 - "r" ((unsigned long)kto + PAGE_SIZE - L1_CACHE_BYTES) 65 + "r" ((unsigned long)kto + PAGE_SIZE - 1) 66 66 : "cc"); 67 67 } 68 68