aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/apic.h3
-rw-r--r--arch/x86/include/asm/irq_remapping.h2
-rw-r--r--arch/x86/kernel/apic/apic.c9
3 files changed, 5 insertions, 9 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 394d177d721b..6d5b6f0900e1 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -184,6 +184,9 @@ static inline int x2apic_enabled(void)
184{ 184{
185 return 0; 185 return 0;
186} 186}
187
188#define x2apic 0
189
187#endif 190#endif
188 191
189extern int get_physical_broadcast(void); 192extern int get_physical_broadcast(void);
diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h
index 20e1fd588dbf..0396760fccb8 100644
--- a/arch/x86/include/asm/irq_remapping.h
+++ b/arch/x86/include/asm/irq_remapping.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_X86_IRQ_REMAPPING_H 1#ifndef _ASM_X86_IRQ_REMAPPING_H
2#define _ASM_X86_IRQ_REMAPPING_H 2#define _ASM_X86_IRQ_REMAPPING_H
3 3
4extern int x2apic;
5
6#define IRTE_DEST(dest) ((x2apic) ? dest : dest << 8) 4#define IRTE_DEST(dest) ((x2apic) ? dest : dest << 8)
7 5
8#endif /* _ASM_X86_IRQ_REMAPPING_H */ 6#endif /* _ASM_X86_IRQ_REMAPPING_H */
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 30909a258d0f..699f8cf76bbb 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -809,7 +809,7 @@ void clear_local_APIC(void)
809 u32 v; 809 u32 v;
810 810
811 /* APIC hasn't been mapped yet */ 811 /* APIC hasn't been mapped yet */
812 if (!apic_phys) 812 if (!x2apic && !apic_phys)
813 return; 813 return;
814 814
815 maxlvt = lapic_get_maxlvt(); 815 maxlvt = lapic_get_maxlvt();
@@ -1523,12 +1523,10 @@ void __init early_init_lapic_mapping(void)
1523 */ 1523 */
1524void __init init_apic_mappings(void) 1524void __init init_apic_mappings(void)
1525{ 1525{
1526#ifdef CONFIG_X86_X2APIC
1527 if (x2apic) { 1526 if (x2apic) {
1528 boot_cpu_physical_apicid = read_apic_id(); 1527 boot_cpu_physical_apicid = read_apic_id();
1529 return; 1528 return;
1530 } 1529 }
1531#endif
1532 1530
1533 /* 1531 /*
1534 * If no local APIC can be found then set up a fake all 1532 * If no local APIC can be found then set up a fake all
@@ -1972,12 +1970,9 @@ static int lapic_resume(struct sys_device *dev)
1972 1970
1973 local_irq_save(flags); 1971 local_irq_save(flags);
1974 1972
1975#ifdef CONFIG_X86_X2APIC
1976 if (x2apic) 1973 if (x2apic)
1977 enable_x2apic(); 1974 enable_x2apic();
1978 else 1975 else {
1979#endif
1980 {
1981 /* 1976 /*
1982 * Make sure the APICBASE points to the right address 1977 * Make sure the APICBASE points to the right address
1983 * 1978 *