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>
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
#include <asm/elf.h>
|
#include <asm/elf.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/smp.h>
|
#include <asm/smp.h>
|
||||||
|
#include <asm/sh_bios.h>
|
||||||
|
|
||||||
#ifdef CONFIG_SH_FPU
|
#ifdef CONFIG_SH_FPU
|
||||||
#define cpu_has_fpu 1
|
#define cpu_has_fpu 1
|
||||||
@@ -342,9 +343,21 @@ asmlinkage void __init sh_cpu_init(void)
|
|||||||
speculative_execution_init();
|
speculative_execution_init();
|
||||||
expmask_init();
|
expmask_init();
|
||||||
|
|
||||||
/*
|
/* Do the rest of the boot processor setup */
|
||||||
* Boot processor to setup the FP and extended state context info.
|
if (raw_smp_processor_id() == 0) {
|
||||||
*/
|
/* Save off the BIOS VBR, if there is one */
|
||||||
if (raw_smp_processor_id() == 0)
|
sh_bios_vbr_init();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Setup VBR for boot CPU. Secondary CPUs do this through
|
||||||
|
* start_secondary().
|
||||||
|
*/
|
||||||
|
per_cpu_trap_init();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Boot processor to setup the FP and extended state
|
||||||
|
* context info.
|
||||||
|
*/
|
||||||
init_thread_xstate();
|
init_thread_xstate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -30,7 +30,6 @@
|
|||||||
#include <asm/alignment.h>
|
#include <asm/alignment.h>
|
||||||
#include <asm/fpu.h>
|
#include <asm/fpu.h>
|
||||||
#include <asm/kprobes.h>
|
#include <asm/kprobes.h>
|
||||||
#include <asm/sh_bios.h>
|
|
||||||
|
|
||||||
#ifdef CONFIG_CPU_SH2
|
#ifdef CONFIG_CPU_SH2
|
||||||
# define TRAP_RESERVED_INST 4
|
# define TRAP_RESERVED_INST 4
|
||||||
@@ -848,12 +847,6 @@ void __init trap_init(void)
|
|||||||
#ifdef TRAP_UBC
|
#ifdef TRAP_UBC
|
||||||
set_exception_table_vec(TRAP_UBC, breakpoint_trap_handler);
|
set_exception_table_vec(TRAP_UBC, breakpoint_trap_handler);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Save off the BIOS VBR, if there is one */
|
|
||||||
sh_bios_vbr_init();
|
|
||||||
|
|
||||||
/* Setup VBR for boot cpu */
|
|
||||||
per_cpu_trap_init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_stack(struct task_struct *tsk, unsigned long *sp)
|
void show_stack(struct task_struct *tsk, unsigned long *sp)
|
||||||
|
Reference in New Issue
Block a user