sh: Flush ITLB too in PTEAEX's flush_tlb_page()
authorMatt Fleming <matt@console-pimps.org>
Sun, 21 Mar 2010 19:51:43 +0000 (19:51 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 23 Mar 2010 04:36:15 +0000 (13:36 +0900)
flush_tlb_page() can be used to flush TLB entries that map executable
pages. Therefore, we need to ensure that the ITLB is also flushed in
local_flush_tlb_page().

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/include/cpu-sh4/cpu/mmu_context.h
arch/sh/mm/tlb-pteaex.c

index 03ea75c5315d4887380d996624e153e603d486df..310ec92f27591645749b7df8cdf19e5f81d05de6 100644 (file)
@@ -19,6 +19,8 @@
 
 #define MMUCR          0xFF000010      /* MMU Control Register */
 
+#define MMU_ITLB_ADDRESS_ARRAY  0xF2000000
+#define MMU_ITLB_ADDRESS_ARRAY2        0xF2800000
 #define MMU_UTLB_ADDRESS_ARRAY 0xF6000000
 #define MMU_UTLB_ADDRESS_ARRAY2        0xF6800000
 #define MMU_PAGE_ASSOC_BIT     0x80
index 32dc674c550c12ec2424adaf46c5856b90a0ea72..bdd0982b56ee977bccef5f36bad3bed8c9b99028 100644 (file)
@@ -73,5 +73,7 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page)
        jump_to_uncached();
        __raw_writel(page, MMU_UTLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT);
        __raw_writel(asid, MMU_UTLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT);
+       __raw_writel(page, MMU_ITLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT);
+       __raw_writel(asid, MMU_ITLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT);
        back_to_cached();
 }