x86: Move lapic_setup() call into init_bsp()
authorBin Meng <bmeng.cn@gmail.com>
Wed, 17 Jun 2015 03:15:37 +0000 (11:15 +0800)
committerSimon Glass <sjg@chromium.org>
Wed, 15 Jul 2015 00:03:16 +0000 (18:03 -0600)
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>
Acked-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/cpu.c
arch/x86/cpu/mp_init.c

index a6e88cfe19bc524f3edaca51fda0485e2d38c933..d108ee5c4e25538bc60314f19d03e83caf0837fc 100644 (file)
@@ -640,8 +640,6 @@ static int x86_mp_init(void)
 {
        struct mp_params mp_params;
 
-       lapic_setup();
-
        mp_params.parallel_microcode_load = 0,
        mp_params.flight_plan = &mp_steps[0];
        mp_params.num_records = ARRAY_SIZE(mp_steps);
index 5564d84e17e46569c0d882ee6d289c2796476a90..e8bc9b6d048da1bff1111afded32887d05b64cbb 100644 (file)
@@ -418,7 +418,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);