aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-25 10:09:31 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-25 10:18:52 -0500
commita906fdaacca49917d83e5032dfc31f694249ad10 (patch)
tree6b00061e1db64f5f2767c129b666ee25487fd59e /arch/x86/kernel/apic
parent4a66b1d95ad8baf6ab884a1c64461449b463eb78 (diff)
x86: dt: Cleanup local apic setup
Up to now we force enable the local apic in the devicetree setup uncoditionally and set smp_found_config unconditionally to 1 when a devicetree blob is available. This breaks, when local apic is disabled in the Kconfig. Make it consistent by initializing device tree explicitely before smp_get_config() so a non lapic configuration could be used as well. To be functional that would require to implement PIT as an interrupt host, but the only user of this code until now is ce4100 which requires apics to be available. So we leave this up to those who need it. Tested-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/apic')
-rw-r--r--arch/x86/kernel/apic/apic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index f0e079823c43..4f43312cfbf8 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1563,7 +1563,7 @@ static int apic_verify(void)
1563 return 0; 1563 return 0;
1564} 1564}
1565 1565
1566int apic_force_enable(void) 1566int apic_force_enable(unsigned long addr)
1567{ 1567{
1568 u32 h, l; 1568 u32 h, l;
1569 1569
@@ -1579,7 +1579,7 @@ int apic_force_enable(void)
1579 if (!(l & MSR_IA32_APICBASE_ENABLE)) { 1579 if (!(l & MSR_IA32_APICBASE_ENABLE)) {
1580 pr_info("Local APIC disabled by BIOS -- reenabling.\n"); 1580 pr_info("Local APIC disabled by BIOS -- reenabling.\n");
1581 l &= ~MSR_IA32_APICBASE_BASE; 1581 l &= ~MSR_IA32_APICBASE_BASE;
1582 l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE; 1582 l |= MSR_IA32_APICBASE_ENABLE | addr;
1583 wrmsr(MSR_IA32_APICBASE, l, h); 1583 wrmsr(MSR_IA32_APICBASE, l, h);
1584 enabled_via_apicbase = 1; 1584 enabled_via_apicbase = 1;
1585 } 1585 }
@@ -1620,7 +1620,7 @@ static int __init detect_init_APIC(void)
1620 "you can enable it with \"lapic\"\n"); 1620 "you can enable it with \"lapic\"\n");
1621 return -1; 1621 return -1;
1622 } 1622 }
1623 if (apic_force_enable()) 1623 if (apic_force_enable(APIC_DEFAULT_PHYS_BASE))
1624 return -1; 1624 return -1;
1625 } else { 1625 } else {
1626 if (apic_verify()) 1626 if (apic_verify())