aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/init.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-02-16 22:33:22 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-02-16 22:33:22 -0500
commit49f3bfe9334a4cf86079d2ee1d08e674b58862a9 (patch)
tree26c6fd90f5c3b0f4cee01095d45c307d505a86a7 /arch/sh/kernel/cpu/init.c
parent1d5cfcdff793e2f34ec61d902fa5ee0c7e4a2208 (diff)
sh: Setup boot CPU VBR early to enable early page faults.
vmemmap and the vmsplit code amongst others need to be able to take page faults much earlier than trap_init() time, so move this in to the early CPU initialization. VBR setup for secondary CPUs is already handled through start_secondary(), so we only need to do this for the boot CPU. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/init.c')
-rw-r--r--arch/sh/kernel/cpu/init.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c
index 6311b0b1789..c736422344e 100644
--- a/arch/sh/kernel/cpu/init.c
+++ b/arch/sh/kernel/cpu/init.c
@@ -24,6 +24,7 @@
24#include <asm/elf.h> 24#include <asm/elf.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/smp.h> 26#include <asm/smp.h>
27#include <asm/sh_bios.h>
27 28
28#ifdef CONFIG_SH_FPU 29#ifdef CONFIG_SH_FPU
29#define cpu_has_fpu 1 30#define cpu_has_fpu 1
@@ -342,9 +343,21 @@ asmlinkage void __init sh_cpu_init(void)
342 speculative_execution_init(); 343 speculative_execution_init();
343 expmask_init(); 344 expmask_init();
344 345
345 /* 346 /* Do the rest of the boot processor setup */
346 * Boot processor to setup the FP and extended state context info. 347 if (raw_smp_processor_id() == 0) {
347 */ 348 /* Save off the BIOS VBR, if there is one */
348 if (raw_smp_processor_id() == 0) 349 sh_bios_vbr_init();
350
351 /*
352 * Setup VBR for boot CPU. Secondary CPUs do this through
353 * start_secondary().
354 */
355 per_cpu_trap_init();
356
357 /*
358 * Boot processor to setup the FP and extended state
359 * context info.
360 */
349 init_thread_xstate(); 361 init_thread_xstate();
362 }
350} 363}