diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2015-04-13 22:29:55 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-04-24 09:36:53 -0400 |
commit | 9a93d4736ec5ec322ec8f240a292c1a86cd0876d (patch) | |
tree | f206bf9ba4168db05820dc203736ab063f1fe35f | |
parent | 50a6ad84b2a2c971e76d57884d61a5a55d7c1601 (diff) |
x86/irq: Remove x86_io_apic_ops.write and x86_io_apic_ops.modify
x86_io_apic_ops.write is always set to native_io_apic_write(),
and nobody overrides it. So get rid of the indirection by changing
native_io_apic_write() as io_apic_write() and removing
x86_io_apic_ops.write.
Do the same for x86_io_apic_ops.modify and native_io_apic_modify().
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Tested-by: Joerg Roedel <jroedel@suse.de>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Cohen <david.a.cohen@linux.intel.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: Yijing Wang <wangyijing@huawei.com>
Cc: Grant Likely <grant.likely@linaro.org>
Link: http://lkml.kernel.org/r/1428978610-28986-19-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 13 | ||||
-rw-r--r-- | arch/x86/include/asm/x86_init.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/x86_init.c | 2 |
4 files changed, 4 insertions, 19 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 4eb4bcc5f219..c6486dd44418 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -208,8 +208,6 @@ extern void disable_ioapic_support(void); | |||
208 | 208 | ||
209 | extern void __init native_io_apic_init_mappings(void); | 209 | extern void __init native_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_io_apic_write(unsigned int apic, unsigned int reg, unsigned int val); | ||
212 | extern void native_io_apic_modify(unsigned int apic, unsigned int reg, unsigned int val); | ||
213 | extern void native_disable_io_apic(void); | 211 | extern void native_disable_io_apic(void); |
214 | 212 | ||
215 | static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) | 213 | static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) |
@@ -217,15 +215,6 @@ static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) | |||
217 | return x86_io_apic_ops.read(apic, reg); | 215 | return x86_io_apic_ops.read(apic, reg); |
218 | } | 216 | } |
219 | 217 | ||
220 | static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value) | ||
221 | { | ||
222 | x86_io_apic_ops.write(apic, reg, value); | ||
223 | } | ||
224 | static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value) | ||
225 | { | ||
226 | x86_io_apic_ops.modify(apic, reg, value); | ||
227 | } | ||
228 | |||
229 | extern void setup_IO_APIC(void); | 218 | extern void setup_IO_APIC(void); |
230 | extern void enable_IO_APIC(void); | 219 | extern void enable_IO_APIC(void); |
231 | extern void disable_IO_APIC(void); | 220 | extern void disable_IO_APIC(void); |
@@ -266,8 +255,6 @@ static inline void mp_save_irq(struct mpc_intsrc *m) { }; | |||
266 | static inline void disable_ioapic_support(void) { } | 255 | static inline void disable_ioapic_support(void) { } |
267 | #define native_io_apic_init_mappings NULL | 256 | #define native_io_apic_init_mappings NULL |
268 | #define native_io_apic_read NULL | 257 | #define native_io_apic_read NULL |
269 | #define native_io_apic_write NULL | ||
270 | #define native_io_apic_modify NULL | ||
271 | #define native_disable_io_apic NULL | 258 | #define native_disable_io_apic NULL |
272 | 259 | ||
273 | static inline void setup_IO_APIC(void) { } | 260 | static inline void setup_IO_APIC(void) { } |
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index 09d4dab9302f..844b37d55a44 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h | |||
@@ -182,8 +182,6 @@ struct x86_msi_ops { | |||
182 | struct x86_io_apic_ops { | 182 | struct x86_io_apic_ops { |
183 | void (*init) (void); | 183 | void (*init) (void); |
184 | unsigned int (*read) (unsigned int apic, unsigned int reg); | 184 | unsigned int (*read) (unsigned int apic, unsigned int reg); |
185 | void (*write) (unsigned int apic, unsigned int reg, unsigned int value); | ||
186 | void (*modify) (unsigned int apic, unsigned int reg, unsigned int value); | ||
187 | void (*disable)(void); | 185 | void (*disable)(void); |
188 | }; | 186 | }; |
189 | 187 | ||
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 76dc9f5bfdbc..d687a10ed3a2 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -280,7 +280,8 @@ unsigned int native_io_apic_read(unsigned int apic, unsigned int reg) | |||
280 | return readl(&io_apic->data); | 280 | return readl(&io_apic->data); |
281 | } | 281 | } |
282 | 282 | ||
283 | void native_io_apic_write(unsigned int apic, unsigned int reg, unsigned int value) | 283 | static void io_apic_write(unsigned int apic, unsigned int reg, |
284 | unsigned int value) | ||
284 | { | 285 | { |
285 | struct io_apic __iomem *io_apic = io_apic_base(apic); | 286 | struct io_apic __iomem *io_apic = io_apic_base(apic); |
286 | 287 | ||
@@ -294,7 +295,8 @@ void native_io_apic_write(unsigned int apic, unsigned int reg, unsigned int valu | |||
294 | * | 295 | * |
295 | * Older SiS APIC requires we rewrite the index register | 296 | * Older SiS APIC requires we rewrite the index register |
296 | */ | 297 | */ |
297 | void native_io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value) | 298 | static void io_apic_modify(unsigned int apic, unsigned int reg, |
299 | unsigned int value) | ||
298 | { | 300 | { |
299 | struct io_apic __iomem *io_apic = io_apic_base(apic); | 301 | struct io_apic __iomem *io_apic = io_apic_base(apic); |
300 | 302 | ||
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index f612dc018fb6..633f07845099 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c | |||
@@ -141,7 +141,5 @@ void arch_restore_msi_irqs(struct pci_dev *dev) | |||
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, | 142 | .init = native_io_apic_init_mappings, |
143 | .read = native_io_apic_read, | 143 | .read = native_io_apic_read, |
144 | .write = native_io_apic_write, | ||
145 | .modify = native_io_apic_modify, | ||
146 | .disable = native_disable_io_apic, | 144 | .disable = native_disable_io_apic, |
147 | }; | 145 | }; |