]> Git Repo - linux.git/commitdiff
x86, irq, mpparse: Release IOAPIC pin when PCI device is disabled
authorJiang Liu <[email protected]>
Mon, 9 Jun 2014 08:20:08 +0000 (16:20 +0800)
committerThomas Gleixner <[email protected]>
Sat, 21 Jun 2014 21:05:44 +0000 (23:05 +0200)
Release IOAPIC pin associated with PCI device when the PCI device
is disabled.

Signed-off-by: Jiang Liu <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Paul Gortmaker <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: Yinghai Lu <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
arch/x86/kernel/mpparse.c
arch/x86/pci/irq.c

index faf503aa3b70de550df1942ea184e94cf137c4ed..fde86d2b79f805b7f26b0c7e69fc34cce2cf9799 100644 (file)
@@ -115,6 +115,7 @@ static void __init MP_bus_info(struct mpc_bus *m)
 
 static struct irq_domain_ops mp_ioapic_irqdomain_ops = {
        .map = mp_irqdomain_map,
+       .unmap = mp_irqdomain_unmap,
 };
 
 static void __init MP_ioapic_info(struct mpc_ioapic *m)
index e4200e5e775eac15bba4c46968fc6c524629b09b..748cfe8ab32246d17210238b74029652a499ffef 100644 (file)
@@ -26,6 +26,7 @@ static int acer_tm360_irqrouting;
 static struct irq_routing_table *pirq_table;
 
 static int pirq_enable_irq(struct pci_dev *dev);
+static void pirq_disable_irq(struct pci_dev *dev);
 
 /*
  * Never use: 0, 1, 2 (timer, keyboard, and cascade)
@@ -53,7 +54,7 @@ struct irq_router_handler {
 };
 
 int (*pcibios_enable_irq)(struct pci_dev *dev) = pirq_enable_irq;
-void (*pcibios_disable_irq)(struct pci_dev *dev) = NULL;
+void (*pcibios_disable_irq)(struct pci_dev *dev) = pirq_disable_irq;
 
 /*
  *  Check passed address for the PCI IRQ Routing Table signature
@@ -1186,7 +1187,7 @@ void pcibios_penalize_isa_irq(int irq, int active)
 
 static int pirq_enable_irq(struct pci_dev *dev)
 {
-       u8 pin;
+       u8 pin = 0;
 
        pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
        if (pin && !pcibios_lookup_irq(dev, 1)) {
@@ -1252,3 +1253,11 @@ static int pirq_enable_irq(struct pci_dev *dev)
        }
        return 0;
 }
+
+static void pirq_disable_irq(struct pci_dev *dev)
+{
+       if (io_apic_assign_pci_irqs && dev->irq) {
+               mp_unmap_irq(dev->irq);
+               dev->irq = 0;
+       }
+}
This page took 0.06295 seconds and 4 git commands to generate.