diff options
Diffstat (limited to 'arch/sh/mm/tlb-sh4.c')
-rw-r--r-- | arch/sh/mm/tlb-sh4.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/sh/mm/tlb-sh4.c b/arch/sh/mm/tlb-sh4.c index ccac77f504a8..cfdf7930d294 100644 --- a/arch/sh/mm/tlb-sh4.c +++ b/arch/sh/mm/tlb-sh4.c | |||
@@ -80,3 +80,31 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page) | |||
80 | __raw_writel(data, addr); | 80 | __raw_writel(data, addr); |
81 | back_to_cached(); | 81 | back_to_cached(); |
82 | } | 82 | } |
83 | |||
84 | void local_flush_tlb_all(void) | ||
85 | { | ||
86 | unsigned long flags, status; | ||
87 | int i; | ||
88 | |||
89 | /* | ||
90 | * Flush all the TLB. | ||
91 | */ | ||
92 | local_irq_save(flags); | ||
93 | jump_to_uncached(); | ||
94 | |||
95 | status = __raw_readl(MMUCR); | ||
96 | status = ((status & MMUCR_URB) >> MMUCR_URB_SHIFT); | ||
97 | |||
98 | if (status == 0) | ||
99 | status = MMUCR_URB_NENTRIES; | ||
100 | |||
101 | for (i = 0; i < status; i++) | ||
102 | __raw_writel(0x0, MMU_UTLB_ADDRESS_ARRAY | (i << 8)); | ||
103 | |||
104 | for (i = 0; i < 4; i++) | ||
105 | __raw_writel(0x0, MMU_ITLB_ADDRESS_ARRAY | (i << 8)); | ||
106 | |||
107 | back_to_cached(); | ||
108 | ctrl_barrier(); | ||
109 | local_irq_restore(flags); | ||
110 | } | ||