sh: Invalidate the TLB after applying PMB mappings.
authorStuart Menefy <stuart.menefy@st.com>
Mon, 26 Nov 2007 12:32:40 +0000 (21:32 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 28 Jan 2008 04:18:58 +0000 (13:18 +0900)
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/mm/pmb.c
include/asm-sh/cpu-sh4/mmu_context.h

index 1d45b82f0a638e12ef1afb939feafc2a39b95612..b632051d6ce5f74f22a05bcf27ba6a4cc013116c 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/pgtable.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
+#include <asm/mmu_context.h>
 
 #define NR_PMB_ENTRIES 16
 
@@ -329,6 +330,11 @@ static int __init pmb_init(void)
        /* PMB.SE and UB[7] */
        ctrl_outl((1 << 31) | (1 << 7), PMB_PASCR);
 
+       /* Flush out the TLB */
+       i =  ctrl_inl(MMUCR);
+       i |= MMUCR_TI;
+       ctrl_outl(i, MMUCR);
+
        back_to_P1();
 
        return 0;
index 979acddc0f8ebe76cda3d3ece1c51d378c7b2667..fdd56e3e3a3bb83351accfdb59426d462cf7cea3 100644 (file)
@@ -22,6 +22,8 @@
 #define MMU_UTLB_ADDRESS_ARRAY 0xF6000000
 #define MMU_PAGE_ASSOC_BIT     0x80
 
+#define MMUCR_TI               (1<<2)
+
 #ifdef CONFIG_X2TLB
 #define MMUCR_ME               (1 << 7)
 #else