aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Kretzschmar <henne@nachtwindheim.de>2011-02-22 09:38:06 -0500
committerIngo Molnar <mingo@elte.hu>2011-02-23 05:38:46 -0500
commit7d0f1926131cf79aa5998d463bf1582156e7b41e (patch)
treea0ffca6d8e940aa54cf355937d8701b9e9a8ad97
parent7167d08e780a722fa79ea414fc4e72bc00751392 (diff)
x86: Add dummy functions for compiling without IOAPIC
This patch adds IOAPIC dummy functions for compilation with local APIC, but without IOAPIC. The local variable ioapic_entries in enable_IR_x2apic() does not need initialization anymore, since the dummy returns NULL. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> LKML-Reference: <1298385487-4708-4-git-send-email-henne@nachtwindheim.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/include/asm/io_apic.h18
-rw-r--r--arch/x86/kernel/apic/apic.c2
2 files changed, 19 insertions, 1 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index 0be2f27b78f3..56dcf08bde62 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -190,6 +190,24 @@ static inline int mp_find_ioapic(u32 gsi) { return 0; }
190struct io_apic_irq_attr; 190struct io_apic_irq_attr;
191static inline int io_apic_set_pci_routing(struct device *dev, int irq, 191static inline int io_apic_set_pci_routing(struct device *dev, int irq,
192 struct io_apic_irq_attr *irq_attr) { return 0; } 192 struct io_apic_irq_attr *irq_attr) { return 0; }
193
194static inline struct IO_APIC_route_entry **alloc_ioapic_entries(void)
195{
196 return NULL;
197}
198
199static inline void free_ioapic_entries(struct IO_APIC_route_entry **ent) { }
200static inline int save_IO_APIC_setup(struct IO_APIC_route_entry **ent)
201{
202 return -ENOMEM;
203}
204
205static inline void mask_IO_APIC_setup(struct IO_APIC_route_entry **ent) { }
206static inline int restore_IO_APIC_setup(struct IO_APIC_route_entry **ent)
207{
208 return -ENOMEM;
209}
210
193static inline void mp_save_irq(struct mpc_intsrc *m) { }; 211static inline void mp_save_irq(struct mpc_intsrc *m) { };
194static inline void disable_ioapic_support(void) { } 212static inline void disable_ioapic_support(void) { }
195#endif 213#endif
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 96e68099b06e..f0e079823c43 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1449,7 +1449,7 @@ int __init enable_IR(void)
1449void __init enable_IR_x2apic(void) 1449void __init enable_IR_x2apic(void)
1450{ 1450{
1451 unsigned long flags; 1451 unsigned long flags;
1452 struct IO_APIC_route_entry **ioapic_entries = NULL; 1452 struct IO_APIC_route_entry **ioapic_entries;
1453 int ret, x2apic_enabled = 0; 1453 int ret, x2apic_enabled = 0;
1454 int dmar_table_init_ret; 1454 int dmar_table_init_ret;
1455 1455