aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-12 00:50:43 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-01-12 00:50:43 -0500
commit191d0d24b632eb69767705acded5cbf7449ad457 (patch)
tree4fda30db2941692bea884685f1df2e751468bd6f /arch/sh/kernel/machine_kexec.c
parentee2760ea58d81fc00bcc2137232ed9bc28202aec (diff)
sh: Tidy up the sh bios VBR handling.
This moves the VBR handling out of the main trap handling code and in to the sh-bios helper code. A couple of accessors are added in order to permit other kernel code to get at the VBR value for state save/restore paths. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/machine_kexec.c')
-rw-r--r--arch/sh/kernel/machine_kexec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c
index 76f280223ebd..f52d8ed69e12 100644
--- a/arch/sh/kernel/machine_kexec.c
+++ b/arch/sh/kernel/machine_kexec.c
@@ -21,6 +21,7 @@
21#include <asm/mmu_context.h> 21#include <asm/mmu_context.h>
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/cacheflush.h> 23#include <asm/cacheflush.h>
24#include <asm/sh_bios.h>
24 25
25typedef void (*relocate_new_kernel_t)(unsigned long indirection_page, 26typedef void (*relocate_new_kernel_t)(unsigned long indirection_page,
26 unsigned long reboot_code_buffer, 27 unsigned long reboot_code_buffer,
@@ -28,7 +29,6 @@ typedef void (*relocate_new_kernel_t)(unsigned long indirection_page,
28 29
29extern const unsigned char relocate_new_kernel[]; 30extern const unsigned char relocate_new_kernel[];
30extern const unsigned int relocate_new_kernel_size; 31extern const unsigned int relocate_new_kernel_size;
31extern void *gdb_vbr_vector;
32extern void *vbr_base; 32extern void *vbr_base;
33 33
34void machine_shutdown(void) 34void machine_shutdown(void)
@@ -117,11 +117,7 @@ void machine_kexec(struct kimage *image)
117 kexec_info(image); 117 kexec_info(image);
118 flush_cache_all(); 118 flush_cache_all();
119 119
120#if defined(CONFIG_SH_STANDARD_BIOS) 120 sh_bios_vbr_reload();
121 asm volatile("ldc %0, vbr" :
122 : "r" (((unsigned long) gdb_vbr_vector) - 0x100)
123 : "memory");
124#endif
125 121
126 /* now call it */ 122 /* now call it */
127 rnk = (relocate_new_kernel_t) reboot_code_buffer; 123 rnk = (relocate_new_kernel_t) reboot_code_buffer;