Skip to content

Commit

Permalink
x86: Call lapic_setup() in interrupt_init()
Browse files Browse the repository at this point in the history
Let's configure LAPIC in a common place - interrupt_init().

Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
  • Loading branch information
lbmeng committed May 23, 2016
1 parent aaaa557 commit e212671
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 5 additions & 3 deletions arch/x86/cpu/interrupts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -266,6 +266,8 @@ int interrupt_init(void)
i8259_init();
#endif

lapic_setup();

/* Initialize core interrupt and exception functionality of CPU */
cpu_init_interrupts();

Expand Down
2 changes: 0 additions & 2 deletions arch/x86/cpu/ivybridge/model_206ax.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions arch/x86/cpu/mp_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e212671

Please sign in to comment.