summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/reboot.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-07-02 15:44:09 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-07-02 15:44:09 +0900
commit59615ecdb516cf218c3699b02d87d9827dc3e0c7 (patch)
tree120c63e846caad2ba0f469cd608015e9a776193f /arch/sh/kernel/reboot.c
parentae9b12c72f831a2f956a5b30fd999f3018c43a89 (diff)
downloadlinux-59615ecdb516cf218c3699b02d87d9827dc3e0c7.tar.bz2
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/kernel/reboot.c')
-rw-r--r--arch/sh/kernel/reboot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sh/kernel/reboot.c b/arch/sh/kernel/reboot.c
index b1fca66bb92e..ca6a5ca64015 100644
--- a/arch/sh/kernel/reboot.c
+++ b/arch/sh/kernel/reboot.c
@@ -9,6 +9,7 @@
#include <asm/addrspace.h>
#include <asm/reboot.h>
#include <asm/system.h>
+#include <asm/tlbflush.h>
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
@@ -25,6 +26,9 @@ static void native_machine_restart(char * __unused)
{
local_irq_disable();
+ /* Destroy all of the TLBs in preparation for reset by MMU */
+ __flush_tlb_global();
+
/* Address error with SR.BL=1 first. */
trigger_address_error();