]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: 8236/1: mm: fix discard_old_kernel_data
authorJungseung Lee <js07.lee@gmail.com>
Sat, 29 Nov 2014 01:51:49 +0000 (02:51 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 3 Dec 2014 16:00:04 +0000 (16:00 +0000)
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>
arch/arm/mm/copypage-v6.c

index b9bcc9d79176a43c464ef562b2118a119d14a825..70423345da26ca93a6b8aa93eb5d0b842fa26345 100644 (file)
@@ -62,7 +62,7 @@ static void discard_old_kernel_data(void *kto)
        __asm__("mcrr   p15, 0, %1, %0, c6      @ 0xec401f06"
           :
           : "r" (kto),
-            "r" ((unsigned long)kto + PAGE_SIZE - L1_CACHE_BYTES)
+            "r" ((unsigned long)kto + PAGE_SIZE - 1)
           : "cc");
 }