diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-07-02 15:44:09 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-07-02 15:44:09 +0900 |
commit | 59615ecdb516cf218c3699b02d87d9827dc3e0c7 (patch) | |
tree | 120c63e846caad2ba0f469cd608015e9a776193f /arch/sh/mm/tlbflush_32.c | |
parent | ae9b12c72f831a2f956a5b30fd999f3018c43a89 (diff) |
sh: Provide a global TLB flush for U/I-TLB clear.
This provides a sledgehammer approach for clearing the TLBs, only to be
used in cases where we know we will never want to use the mappings again
and have no interest in preserving state. This also destroys wired
entries.
The primary use for this is when we are either entering or exiting the
kernel completely, in the latter case as a precursor for CPU reset by
MMU.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/tlbflush_32.c')
-rw-r--r-- | arch/sh/mm/tlbflush_32.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sh/mm/tlbflush_32.c b/arch/sh/mm/tlbflush_32.c index 3fbe03ce8fe3..a6a20d6de4c0 100644 --- a/arch/sh/mm/tlbflush_32.c +++ b/arch/sh/mm/tlbflush_32.c @@ -119,3 +119,19 @@ void local_flush_tlb_mm(struct mm_struct *mm) local_irq_restore(flags); } } + +void __flush_tlb_global(void) +{ + unsigned long flags; + + local_irq_save(flags); + + /* + * This is the most destructive of the TLB flushing options, + * and will tear down all of the UTLB/ITLB mappings, including + * wired entries. + */ + __raw_writel(__raw_readl(MMUCR) | MMUCR_TI, MMUCR); + + local_irq_restore(flags); +} |