From 9d44190eae97ad4c9ce30f1084e1b0dabd646df5 Mon Sep 17 00:00:00 2001 From: kogiidena Date: Mon, 16 Jan 2006 22:14:10 -0800 Subject: [PATCH] sh: kexec() support This adds kexec() support for SH. Signed-off-by: kogiidena Signed-off-by: Paul Mundt Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/sh/kernel/process.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/sh/kernel/process.c') diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index aac15e42d03..a4dc2b532e1 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)); -- cgit v1.2.3