[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/3] xen: Don't register GSI in pre-setup
Xen behaves the same way that native Linux, it only allows any IO-APIC pin to be setup once. Therefor we must not set it up in the initial run over all legacy interrupts. Signed-off-by: Bastian Blank <waldi@xxxxxxxxxx> --- arch/x86/include/asm/xen/pci.h | 1 + arch/x86/xen/pci.c | 31 ++++++++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/arch/x86/include/asm/xen/pci.h b/arch/x86/include/asm/xen/pci.h index d68637f..6286bbb 100644 --- a/arch/x86/include/asm/xen/pci.h +++ b/arch/x86/include/asm/xen/pci.h @@ -64,6 +64,7 @@ static inline int xen_pci_setup_msi_irqs(struct pci_dev *dev, int nvec, int type #endif /* CONFIG_PCI_MSI */ #ifdef CONFIG_XEN_DOM0_PCI +int xen_register_pirq(u32 gsi, int triggering); int xen_register_gsi(u32 gsi, int triggering, int polarity); int xen_find_device_domain_owner(struct pci_dev *dev); int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain); diff --git a/arch/x86/xen/pci.c b/arch/x86/xen/pci.c index eabb512..3e95f76 100644 --- a/arch/x86/xen/pci.c +++ b/arch/x86/xen/pci.c @@ -16,10 +16,9 @@ #include "xen-ops.h" -int xen_register_gsi(u32 gsi, int triggering, int polarity) +int xen_register_pirq(u32 gsi, int triggering) { int rc, irq; - struct physdev_setup_gsi setup_gsi; struct physdev_map_pirq map_irq; int shareable = 0; char *name; @@ -27,9 +26,6 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity) if (!xen_domain()) return -1; - printk(KERN_DEBUG "xen: registering gsi %u triggering %d polarity %d\n", - gsi, triggering, polarity); - if (triggering == ACPI_EDGE_SENSITIVE) { shareable = 0; name = "ioapic-edge"; @@ -56,6 +52,25 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity) return -1; } + return irq; +} + +int xen_register_gsi(u32 gsi, int triggering, int polarity) +{ + int rc, irq; + struct physdev_setup_gsi setup_gsi; + struct physdev_map_pirq map_irq; + int shareable = 0; + char *name; + + if (!xen_domain()) + return -1; + + printk(KERN_DEBUG "xen: registering gsi %u triggering %d polarity %d\n", + gsi, triggering, polarity); + + irq = xen_register_pirq(gsi, triggering); + setup_gsi.gsi = gsi; setup_gsi.triggering = (triggering == ACPI_EDGE_SENSITIVE ? 0 : 1); @@ -67,7 +82,6 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity) else if (rc) { printk(KERN_ERR "Failed to setup GSI :%d, err_code:%d\n", gsi, rc); - BUG(); } return irq; @@ -181,9 +195,8 @@ void __init xen_setup_pirqs(void) if (acpi_get_override_irq(irq, &trigger, &polarity) == -1) continue; - xen_register_gsi(irq, - trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE, - polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH); + xen_register_pirq(irq, + trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE); } xen_setup_acpi_sci(); -- 1.7.0 -- Sometimes a feeling is all we humans have to go on. -- Kirk, "A Taste of Armageddon", stardate 3193.9 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |