From: Jan Beulich Date: Thu, 22 Sep 2011 17:31:02 +0000 (+0100) Subject: x86: IO-APIC code has no dependency on PCI X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~9870 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1f6bf99c22ce2e13d09e24431688679a96be36a0;p=xen.git x86: IO-APIC code has no dependency on PCI The IRQ handling code requires pcidevs_lock to be held only for MSI interrupts. As the handling of which was now fully moved into msi.c (i.e. while applying fine without, the patch needs to be applied after the one titled "x86: split MSI IRQ chip"), io_apic.c now also doesn't need to include PCI headers anymore. Signed-off-by: Jan Beulich --- diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index a7081570ca..b0249c5329 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -27,8 +27,6 @@ #include #include #include -#include -#include #include #include #include @@ -2491,12 +2489,10 @@ int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val) add_pin_to_irq(irq, apic, pin); } - spin_lock(&pcidevs_lock); spin_lock(&dom0->event_lock); ret = map_domain_pirq(dom0, pirq, irq, MAP_PIRQ_TYPE_GSI, NULL); spin_unlock(&dom0->event_lock); - spin_unlock(&pcidevs_lock); if ( ret < 0 ) return ret; diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 9606ae2c1e..e0b2d01379 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1662,10 +1662,7 @@ int map_domain_pirq( struct pirq *info; struct irq_desc *desc; unsigned long flags; - struct msi_desc *msi_desc; - struct pci_dev *pdev = NULL; - ASSERT(spin_is_locked(&pcidevs_lock)); ASSERT(spin_is_locked(&d->event_lock)); if ( !IS_PRIV(current->domain) && @@ -1708,6 +1705,10 @@ int map_domain_pirq( if ( type == MAP_PIRQ_TYPE_MSI ) { struct msi_info *msi = (struct msi_info *)data; + struct msi_desc *msi_desc; + struct pci_dev *pdev; + + ASSERT(spin_is_locked(&pcidevs_lock)); ret = -ENODEV; if ( !cpu_has_apic )