diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-04-24 07:57:48 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-04-24 09:36:54 -0400 |
commit | ca1b88622e9c16df7b1e0a57e9c6c2300321bed4 (patch) | |
tree | 6807aad02f5210e30c1b8250ef4e02b0efd42212 | |
parent | 9a93d4736ec5ec322ec8f240a292c1a86cd0876d (diff) |
x86: Remove more unmodified io_apic_ops
io_apic_ops.init() is either NULL, if IO-APIC support is disabled at
compile time or native_io_apic_init_mappings(). No point to have that
as we can achieve the same thing with an empty inline.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/x86_init.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/x86_init.c | 1 |
5 files changed, 5 insertions, 8 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index c6486dd44418..f80f4efa1717 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -206,7 +206,7 @@ extern void mp_save_irq(struct mpc_intsrc *m); | |||
206 | 206 | ||
207 | extern void disable_ioapic_support(void); | 207 | extern void disable_ioapic_support(void); |
208 | 208 | ||
209 | extern void __init native_io_apic_init_mappings(void); | 209 | extern void __init io_apic_init_mappings(void); |
210 | extern unsigned int native_io_apic_read(unsigned int apic, unsigned int reg); | 210 | extern unsigned int native_io_apic_read(unsigned int apic, unsigned int reg); |
211 | extern void native_disable_io_apic(void); | 211 | extern void native_disable_io_apic(void); |
212 | 212 | ||
@@ -251,9 +251,9 @@ static inline int restore_ioapic_entries(void) | |||
251 | return -ENOMEM; | 251 | return -ENOMEM; |
252 | } | 252 | } |
253 | 253 | ||
254 | static inline void mp_save_irq(struct mpc_intsrc *m) { }; | 254 | static inline void mp_save_irq(struct mpc_intsrc *m) { } |
255 | static inline void disable_ioapic_support(void) { } | 255 | static inline void disable_ioapic_support(void) { } |
256 | #define native_io_apic_init_mappings NULL | 256 | static inline void io_apic_init_mappings(void) { } |
257 | #define native_io_apic_read NULL | 257 | #define native_io_apic_read NULL |
258 | #define native_disable_io_apic NULL | 258 | #define native_disable_io_apic NULL |
259 | 259 | ||
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index 844b37d55a44..48d34d28f5a6 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h | |||
@@ -180,7 +180,6 @@ struct x86_msi_ops { | |||
180 | }; | 180 | }; |
181 | 181 | ||
182 | struct x86_io_apic_ops { | 182 | struct x86_io_apic_ops { |
183 | void (*init) (void); | ||
184 | unsigned int (*read) (unsigned int apic, unsigned int reg); | 183 | unsigned int (*read) (unsigned int apic, unsigned int reg); |
185 | void (*disable)(void); | 184 | void (*disable)(void); |
186 | }; | 185 | }; |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index d687a10ed3a2..3029502b0a50 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -2687,7 +2687,7 @@ static struct resource * __init ioapic_setup_resources(void) | |||
2687 | return res; | 2687 | return res; |
2688 | } | 2688 | } |
2689 | 2689 | ||
2690 | void __init native_io_apic_init_mappings(void) | 2690 | void __init io_apic_init_mappings(void) |
2691 | { | 2691 | { |
2692 | unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0; | 2692 | unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0; |
2693 | struct resource *ioapic_res; | 2693 | struct resource *ioapic_res; |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index d74ac33290ae..8d04a7594a03 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -1222,8 +1222,7 @@ void __init setup_arch(char **cmdline_p) | |||
1222 | init_cpu_to_node(); | 1222 | init_cpu_to_node(); |
1223 | 1223 | ||
1224 | init_apic_mappings(); | 1224 | init_apic_mappings(); |
1225 | if (x86_io_apic_ops.init) | 1225 | io_apic_init_mappings(); |
1226 | x86_io_apic_ops.init(); | ||
1227 | 1226 | ||
1228 | kvm_guest_init(); | 1227 | kvm_guest_init(); |
1229 | 1228 | ||
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index 633f07845099..3cee10abf01d 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c | |||
@@ -139,7 +139,6 @@ void arch_restore_msi_irqs(struct pci_dev *dev) | |||
139 | #endif | 139 | #endif |
140 | 140 | ||
141 | struct x86_io_apic_ops x86_io_apic_ops = { | 141 | struct x86_io_apic_ops x86_io_apic_ops = { |
142 | .init = native_io_apic_init_mappings, | ||
143 | .read = native_io_apic_read, | 142 | .read = native_io_apic_read, |
144 | .disable = native_disable_io_apic, | 143 | .disable = native_disable_io_apic, |
145 | }; | 144 | }; |