diff options
author | kogiidena <kogiidena@eggplant.ddo.jp> | 2006-01-16 22:14:10 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-16 23:15:27 -0800 |
commit | 9d44190eae97ad4c9ce30f1084e1b0dabd646df5 (patch) | |
tree | d4801a1f62ea7493b34c306a4ee685e0c4fa5f53 /arch/sh/kernel/process.c | |
parent | 0d831770b154a057562236e8cf50905c8f1ae1b0 (diff) | |
download | linux-9d44190eae97ad4c9ce30f1084e1b0dabd646df5.tar.bz2 |
[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.c | 10 |
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)); |