summaryrefslogtreecommitdiff
path: root/arch/x86/pci/intel_mid_pci.c
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2015-06-10 11:54:59 +0300
committerBjorn Helgaas <bhelgaas@google.com>2015-07-30 22:05:57 +0300
commit991de2e59090e55c65a7f59a049142e3c480f7bd (patch)
treeb6b31c900abc49312c0306b4a0d596d74a22f71c /arch/x86/pci/intel_mid_pci.c
parent890e4847587fcff5eb0438e90992ad7d2a261f33 (diff)
downloadlinux-991de2e59090e55c65a7f59a049142e3c480f7bd.tar.xz
PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()
To support IOAPIC hotplug, we need to allocate PCI IRQ resources on demand and free them when not used anymore. Implement pcibios_alloc_irq() and pcibios_free_irq() to dynamically allocate and free PCI IRQs. Remove mp_should_keep_irq(), which is no longer used. [bhelgaas: changelog] Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/pci/intel_mid_pci.c')
-rw-r--r--arch/x86/pci/intel_mid_pci.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c
index 27062303c881..fb7a1f96d80c 100644
--- a/arch/x86/pci/intel_mid_pci.c
+++ b/arch/x86/pci/intel_mid_pci.c
@@ -234,10 +234,13 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)
static void intel_mid_pci_irq_disable(struct pci_dev *dev)
{
- if (!mp_should_keep_irq(&dev->dev) && dev->irq_managed &&
- dev->irq > 0) {
+ if (dev->irq_managed && dev->irq > 0) {
mp_unmap_irq(dev->irq);
dev->irq_managed = 0;
+ /*
+ * Don't reset dev->irq here, otherwise
+ * intel_mid_pci_irq_enable() will fail on next call.
+ */
}
}