From: Bin Meng Date: Sun, 22 May 2016 08:45:33 +0000 (-0700) Subject: x86: Call lapic_setup() in interrupt_init() X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=e2126711af40ae669610d3500fe23c81b7ad6307;p=u-boot.git x86: Call lapic_setup() in interrupt_init() Let's configure LAPIC in a common place - interrupt_init(). Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index 10dc4d47f0..dd2819a12c 100644 --- a/arch/x86/cpu/interrupts.c +++ b/arch/x86/cpu/interrupts.c @@ -15,14 +15,14 @@ #include #include #include +#include #include #include -#include -#include +#include #include +#include #include #include -#include 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(); diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybridge/model_206ax.c index e710ac479c..38e244b05e 100644 --- a/arch/x86/cpu/ivybridge/model_206ax.c +++ b/arch/x86/cpu/ivybridge/model_206ax.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -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(); diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index 8207274879..2b6b3bd04e 100644 --- a/arch/x86/cpu/mp_init.c +++ b/arch/x86/cpu/mp_init.c @@ -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) {