]> git.sur5r.net Git - u-boot/commitdiff
x86: Call lapic_setup() in interrupt_init()
authorBin Meng <bmeng.cn@gmail.com>
Sun, 22 May 2016 08:45:33 +0000 (01:45 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 23 May 2016 07:27:41 +0000 (15:27 +0800)
Let's configure LAPIC in a common place - interrupt_init().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/interrupts.c
arch/x86/cpu/ivybridge/model_206ax.c
arch/x86/cpu/mp_init.c

index 10dc4d47f06d88431aafa2ed294a91ae38e6fa1d..dd2819a12c79c2334f2191b498b19812308e9237 100644 (file)
 #include <dm.h>
 #include <asm/cache.h>
 #include <asm/control_regs.h>
+#include <asm/i8259.h>
 #include <asm/interrupt.h>
 #include <asm/io.h>
-#include <asm/processor-flags.h>
-#include <linux/compiler.h>
+#include <asm/lapic.h>
 #include <asm/msr.h>
+#include <asm/processor-flags.h>
 #include <asm/processor.h>
 #include <asm/u-boot-x86.h>
-#include <asm/i8259.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -266,6 +266,8 @@ int interrupt_init(void)
        i8259_init();
 #endif
 
+       lapic_setup();
+
        /* Initialize core interrupt and exception functionality of CPU */
        cpu_init_interrupts();
 
index e710ac479cb64427d587d9d8140ca687728ad5aa..38e244b05e72044cfe66fe199e41dac1d477ed05 100644 (file)
@@ -14,7 +14,6 @@
 #include <malloc.h>
 #include <asm/cpu.h>
 #include <asm/cpu_x86.h>
-#include <asm/lapic.h>
 #include <asm/msr.h>
 #include <asm/msr-index.h>
 #include <asm/mtrr.h>
@@ -418,7 +417,6 @@ static int model_206ax_init(struct udevice *dev)
 
        /* Enable the local cpu apics */
        enable_lapic_tpr();
-       lapic_setup();
 
        /* Enable virtualization if enabled in CMOS */
        enable_vmx();
index 8207274879ce67663eb682cb25b5d68bcfaafe1c..2b6b3bd04e6d137b1078d208fa22a42985439332 100644 (file)
@@ -408,8 +408,6 @@ static int init_bsp(struct udevice **devp)
        cpu_get_name(processor_name);
        debug("CPU: %s\n", processor_name);
 
-       lapic_setup();
-
        apic_id = lapicid();
        ret = find_cpu_by_apic_id(apic_id, devp);
        if (ret) {