diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2014-06-09 04:20:03 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-06-21 17:05:44 -0400 |
commit | 9f354b0252b81c870ac7534d71906280cb573f86 (patch) | |
tree | 2ca69262d87ef4f00bde5075e0f6ade4fd6cad37 | |
parent | 795aacf63fee1bfe8b68fd5db4882576c5c0c570 (diff) |
x86, irq: Clean up unused IOAPIC interface
Now we have converted all x86 platforms to use the common irqdomain map
interface. There's no caller of io_apic_set_pci_routing(),
setup_IO_APIC_irq_extra() and io_apic_setup_irq_pin_once() any more,
so kill them.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/1402302011-23642-35-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 | 9 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 70 |
2 files changed, 0 insertions, 79 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index c53587868590..af6f9d4309bf 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -141,9 +141,6 @@ extern int noioapicreroute; | |||
141 | 141 | ||
142 | struct io_apic_irq_attr; | 142 | struct io_apic_irq_attr; |
143 | struct irq_cfg; | 143 | struct irq_cfg; |
144 | extern int io_apic_set_pci_routing(struct device *dev, int irq, | ||
145 | struct io_apic_irq_attr *irq_attr); | ||
146 | extern void setup_IO_APIC_irq_extra(u32 gsi); | ||
147 | extern void ioapic_insert_resources(void); | 144 | extern void ioapic_insert_resources(void); |
148 | 145 | ||
149 | extern int native_setup_ioapic_entry(int, struct IO_APIC_route_entry *, | 146 | extern int native_setup_ioapic_entry(int, struct IO_APIC_route_entry *, |
@@ -155,8 +152,6 @@ extern void native_compose_msi_msg(struct pci_dev *pdev, | |||
155 | unsigned int irq, unsigned int dest, | 152 | unsigned int irq, unsigned int dest, |
156 | struct msi_msg *msg, u8 hpet_id); | 153 | struct msi_msg *msg, u8 hpet_id); |
157 | extern void native_eoi_ioapic_pin(int apic, int pin, int vector); | 154 | extern void native_eoi_ioapic_pin(int apic, int pin, int vector); |
158 | extern int io_apic_setup_irq_pin_once(unsigned int irq, int node, | ||
159 | struct io_apic_irq_attr *attr); | ||
160 | 155 | ||
161 | extern int save_ioapic_entries(void); | 156 | extern int save_ioapic_entries(void); |
162 | extern void mask_ioapic_entries(void); | 157 | extern void mask_ioapic_entries(void); |
@@ -240,10 +235,6 @@ static inline int mp_find_ioapic(u32 gsi) { return 0; } | |||
240 | static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; } | 235 | static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; } |
241 | static inline int mp_map_gsi_to_irq(u32 gsi, unsigned int flags) { return gsi; } | 236 | static inline int mp_map_gsi_to_irq(u32 gsi, unsigned int flags) { return gsi; } |
242 | 237 | ||
243 | struct io_apic_irq_attr; | ||
244 | static inline int io_apic_set_pci_routing(struct device *dev, int irq, | ||
245 | struct io_apic_irq_attr *irq_attr) { return 0; } | ||
246 | |||
247 | static inline int save_ioapic_entries(void) | 238 | static inline int save_ioapic_entries(void) |
248 | { | 239 | { |
249 | return -ENOMEM; | 240 | return -ENOMEM; |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index a602b35bcfe7..6e3d4c771832 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -111,7 +111,6 @@ static struct ioapic { | |||
111 | struct ioapic_domain_cfg irqdomain_cfg; | 111 | struct ioapic_domain_cfg irqdomain_cfg; |
112 | struct irq_domain *irqdomain; | 112 | struct irq_domain *irqdomain; |
113 | struct mp_pin_info *pin_info; | 113 | struct mp_pin_info *pin_info; |
114 | DECLARE_BITMAP(pin_programmed, MP_MAX_IOAPIC_PIN + 1); | ||
115 | } ioapics[MAX_IO_APICS]; | 114 | } ioapics[MAX_IO_APICS]; |
116 | 115 | ||
117 | #define mpc_ioapic_ver(ioapic_idx) ioapics[ioapic_idx].mp_config.apicver | 116 | #define mpc_ioapic_ver(ioapic_idx) ioapics[ioapic_idx].mp_config.apicver |
@@ -1524,38 +1523,6 @@ static void __init setup_IO_APIC_irqs(void) | |||
1524 | } | 1523 | } |
1525 | 1524 | ||
1526 | /* | 1525 | /* |
1527 | * for the gsi that is not in first ioapic | ||
1528 | * but could not use acpi_register_gsi() | ||
1529 | * like some special sci in IBM x3330 | ||
1530 | */ | ||
1531 | void setup_IO_APIC_irq_extra(u32 gsi) | ||
1532 | { | ||
1533 | int ioapic_idx = 0, pin, idx, irq, node = cpu_to_node(0); | ||
1534 | struct io_apic_irq_attr attr; | ||
1535 | |||
1536 | /* | ||
1537 | * Convert 'gsi' to 'ioapic.pin'. | ||
1538 | */ | ||
1539 | ioapic_idx = mp_find_ioapic(gsi); | ||
1540 | if (ioapic_idx < 0) | ||
1541 | return; | ||
1542 | |||
1543 | pin = mp_find_ioapic_pin(ioapic_idx, gsi); | ||
1544 | idx = find_irq_entry(ioapic_idx, pin, mp_INT); | ||
1545 | if (idx == -1) | ||
1546 | return; | ||
1547 | |||
1548 | irq = pin_2_irq(idx, ioapic_idx, pin, IOAPIC_MAP_ALLOC); | ||
1549 | if (irq < 0 || mp_init_irq_at_boot(ioapic_idx, irq)) | ||
1550 | return; | ||
1551 | |||
1552 | set_io_apic_irq_attr(&attr, ioapic_idx, pin, irq_trigger(idx), | ||
1553 | irq_polarity(idx)); | ||
1554 | |||
1555 | io_apic_setup_irq_pin_once(irq, node, &attr); | ||
1556 | } | ||
1557 | |||
1558 | /* | ||
1559 | * Set up the timer pin, possibly with the 8259A-master behind. | 1526 | * Set up the timer pin, possibly with the 8259A-master behind. |
1560 | */ | 1527 | */ |
1561 | static void __init setup_timer_IRQ0_pin(unsigned int ioapic_idx, | 1528 | static void __init setup_timer_IRQ0_pin(unsigned int ioapic_idx, |
@@ -3458,27 +3425,6 @@ io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr) | |||
3458 | return ret; | 3425 | return ret; |
3459 | } | 3426 | } |
3460 | 3427 | ||
3461 | int io_apic_setup_irq_pin_once(unsigned int irq, int node, | ||
3462 | struct io_apic_irq_attr *attr) | ||
3463 | { | ||
3464 | unsigned int ioapic_idx = attr->ioapic, pin = attr->ioapic_pin; | ||
3465 | int ret; | ||
3466 | struct IO_APIC_route_entry orig_entry; | ||
3467 | |||
3468 | /* Avoid redundant programming */ | ||
3469 | if (test_bit(pin, ioapics[ioapic_idx].pin_programmed)) { | ||
3470 | pr_debug("Pin %d-%d already programmed\n", mpc_ioapic_id(ioapic_idx), pin); | ||
3471 | orig_entry = ioapic_read_entry(attr->ioapic, pin); | ||
3472 | if (attr->trigger == orig_entry.trigger && attr->polarity == orig_entry.polarity) | ||
3473 | return 0; | ||
3474 | return -EBUSY; | ||
3475 | } | ||
3476 | ret = io_apic_setup_irq_pin(irq, node, attr); | ||
3477 | if (!ret) | ||
3478 | set_bit(pin, ioapics[ioapic_idx].pin_programmed); | ||
3479 | return ret; | ||
3480 | } | ||
3481 | |||
3482 | static int __init io_apic_get_redir_entries(int ioapic) | 3428 | static int __init io_apic_get_redir_entries(int ioapic) |
3483 | { | 3429 | { |
3484 | union IO_APIC_reg_01 reg_01; | 3430 | union IO_APIC_reg_01 reg_01; |
@@ -3525,22 +3471,6 @@ int __init arch_probe_nr_irqs(void) | |||
3525 | return 0; | 3471 | return 0; |
3526 | } | 3472 | } |
3527 | 3473 | ||
3528 | int io_apic_set_pci_routing(struct device *dev, int irq, | ||
3529 | struct io_apic_irq_attr *irq_attr) | ||
3530 | { | ||
3531 | int node; | ||
3532 | |||
3533 | if (!IO_APIC_IRQ(irq)) { | ||
3534 | apic_printk(APIC_QUIET,KERN_ERR "IOAPIC[%d]: Invalid reference to IRQ 0\n", | ||
3535 | irq_attr->ioapic); | ||
3536 | return -EINVAL; | ||
3537 | } | ||
3538 | |||
3539 | node = dev ? dev_to_node(dev) : cpu_to_node(0); | ||
3540 | |||
3541 | return io_apic_setup_irq_pin_once(irq, node, irq_attr); | ||
3542 | } | ||
3543 | |||
3544 | #ifdef CONFIG_X86_32 | 3474 | #ifdef CONFIG_X86_32 |
3545 | static int __init io_apic_get_unique_id(int ioapic, int apic_id) | 3475 | static int __init io_apic_get_unique_id(int ioapic, int apic_id) |
3546 | { | 3476 | { |