Message ID | 1463906739-934-10-git-send-email-bmeng.cn@gmail.com |
---|---|
State | Accepted |
Commit | e2126711af40ae669610d3500fe23c81b7ad6307 |
Delegated to: | Bin Meng |
Headers | show |
On 22 May 2016 at 02:45, Bin Meng <bmeng.cn@gmail.com> wrote: > Let's configure LAPIC in a common place - interrupt_init(). > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > --- > > arch/x86/cpu/interrupts.c | 8 +++++--- > arch/x86/cpu/ivybridge/model_206ax.c | 2 -- > arch/x86/cpu/mp_init.c | 2 -- > 3 files changed, 5 insertions(+), 7 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org>
On Mon, May 23, 2016 at 8:19 AM, Simon Glass <sjg@chromium.org> wrote: > On 22 May 2016 at 02:45, Bin Meng <bmeng.cn@gmail.com> wrote: >> Let's configure LAPIC in a common place - interrupt_init(). >> >> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> >> --- >> >> arch/x86/cpu/interrupts.c | 8 +++++--- >> arch/x86/cpu/ivybridge/model_206ax.c | 2 -- >> arch/x86/cpu/mp_init.c | 2 -- >> 3 files changed, 5 insertions(+), 7 deletions(-) > > Reviewed-by: Simon Glass <sjg@chromium.org> applied to u-boot-x86, thanks!
diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index 10dc4d4..dd2819a 100644 --- a/arch/x86/cpu/interrupts.c +++ b/arch/x86/cpu/interrupts.c @@ -15,14 +15,14 @@ #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(); diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybridge/model_206ax.c index e710ac4..38e244b 100644 --- a/arch/x86/cpu/ivybridge/model_206ax.c +++ b/arch/x86/cpu/ivybridge/model_206ax.c @@ -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(); diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index 2604a68..bdcc029 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) {
Let's configure LAPIC in a common place - interrupt_init(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- arch/x86/cpu/interrupts.c | 8 +++++--- arch/x86/cpu/ivybridge/model_206ax.c | 2 -- arch/x86/cpu/mp_init.c | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-)