aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2014-06-09 04:20:03 -0400
committerThomas Gleixner <tglx@linutronix.de>2014-06-21 17:05:44 -0400
commit9f354b0252b81c870ac7534d71906280cb573f86 (patch)
tree2ca69262d87ef4f00bde5075e0f6ade4fd6cad37 /arch/x86/kernel
parent795aacf63fee1bfe8b68fd5db4882576c5c0c570 (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>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/apic/io_apic.c70
1 files changed, 0 insertions, 70 deletions
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 */
1531void 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 */
1561static void __init setup_timer_IRQ0_pin(unsigned int ioapic_idx, 1528static 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
3461int 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
3482static int __init io_apic_get_redir_entries(int ioapic) 3428static 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
3528int 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
3545static int __init io_apic_get_unique_id(int ioapic, int apic_id) 3475static int __init io_apic_get_unique_id(int ioapic, int apic_id)
3546{ 3476{