summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/process.c
diff options
context:
space:
mode:
authorkogiidena <kogiidena@eggplant.ddo.jp>2006-01-17 07:14:10 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-17 08:15:27 +0100
commit9d44190eae97ad4c9ce30f1084e1b0dabd646df5 (patch)
treed4801a1f62ea7493b34c306a4ee685e0c4fa5f53 /arch/sh/kernel/process.c
parent[PATCH] sh: DMA updates (diff)
downloadlinux-9d44190eae97ad4c9ce30f1084e1b0dabd646df5.tar.xz
linux-9d44190eae97ad4c9ce30f1084e1b0dabd646df5.zip
[PATCH] sh: kexec() support
This adds kexec() support for SH. Signed-off-by: kogiidena <kogiidena@eggplant.ddo.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Cc: <fastboot@lists.osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sh/kernel/process.c')
-rw-r--r--arch/sh/kernel/process.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index aac15e42d03b..a4dc2b532e10 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -71,6 +71,16 @@ void cpu_idle(void)
void machine_restart(char * __unused)
{
+
+#ifdef CONFIG_KEXEC
+ struct kimage *image;
+ image = xchg(&kexec_image, 0);
+ if (image) {
+ machine_shutdown();
+ machine_kexec(image);
+ }
+#endif
+
/* SR.BL=1 and invoke address error to let CPU reset (manual reset) */
asm volatile("ldc %0, sr\n\t"
"mov.l @%1, %0" : : "r" (0x10000000), "r" (0x80000001));