Message ID | BLU437-SMTP3593E087AD13DB4759713BFBE0@phx.gbl |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
On 9 June 2015 at 01:45, Bin Meng <bmeng.cn@gmail.com> wrote: > Currently lapic_setup() is called before calling mp_init(), which > then calls init_bsp() where it calls enable_lapic(), which was > already enabled in lapic_setup(). Hence move lapic_setup() call > into init_bsp() to avoid the duplication. > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > --- > > arch/x86/cpu/cpu.c | 2 -- > arch/x86/cpu/mp_init.c | 2 +- > 2 files changed, 1 insertion(+), 3 deletions(-) Acked-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index ddc7dc3..dd1b18b 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -626,8 +626,6 @@ static int x86_mp_init(void) { struct mp_params mp_params; - lapic_setup(); - mp_params.num_cpus = detect_num_cpus(); mp_params.parallel_microcode_load = 0, mp_params.flight_plan = &mp_steps[0]; diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index ac5753a..864eb63 100644 --- a/arch/x86/cpu/mp_init.c +++ b/arch/x86/cpu/mp_init.c @@ -415,7 +415,7 @@ static int init_bsp(struct udevice **devp) cpu_get_name(processor_name); debug("CPU: %s.\n", processor_name); - enable_lapic(); + lapic_setup(); apic_id = lapicid(); ret = find_cpu_by_apid_id(apic_id, devp);
Currently lapic_setup() is called before calling mp_init(), which then calls init_bsp() where it calls enable_lapic(), which was already enabled in lapic_setup(). Hence move lapic_setup() call into init_bsp() to avoid the duplication. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- arch/x86/cpu/cpu.c | 2 -- arch/x86/cpu/mp_init.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-)