aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include/asm/system_32.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-20 16:42:52 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-01-20 16:42:52 +0900
commitfbb82b03653cdb7fd1863b911e7540011259d2ce (patch)
treed5920f46068bb184a5322bc1505fb030adb6bfb6 /arch/sh/include/asm/system_32.h
parent2efa53b269ec1e9289a108e1506f53f6f1de440b (diff)
sh: machine_ops based reboot support.
This provides a machine_ops-based reboot interface loosely cloned from x86, and converts the native sh32 and sh64 cases over to it. Necessary both for tying in SMP support and also enabling platforms like SDK7786 to add support for their microcontroller-based power managers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/system_32.h')
-rw-r--r--arch/sh/include/asm/system_32.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h
index 06814f5b59c..34bd2bac9a5 100644
--- a/arch/sh/include/asm/system_32.h
+++ b/arch/sh/include/asm/system_32.h
@@ -2,6 +2,7 @@
#define __ASM_SH_SYSTEM_32_H
#include <linux/types.h>
+#include <asm/mmu.h>
#ifdef CONFIG_SH_DSP
@@ -216,6 +217,17 @@ static inline reg_size_t register_align(void *val)
int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,
struct mem_access *ma, int);
+static inline void trigger_address_error(void)
+{
+ if (__in_29bit_mode())
+ __asm__ __volatile__ (
+ "ldc %0, sr\n\t"
+ "mov.l @%1, %0"
+ :
+ : "r" (0x10000000), "r" (0x80000001)
+ );
+}
+
asmlinkage void do_address_error(struct pt_regs *regs,
unsigned long writeaccess,
unsigned long address);