diff options
Diffstat (limited to 'arch/x86/pci')
-rw-r--r-- | arch/x86/pci/xen.c | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index c489ef2c1a39..9098d880c476 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c | |||
@@ -458,6 +458,7 @@ int __init pci_xen_hvm_init(void) | |||
458 | * just how GSIs get registered. | 458 | * just how GSIs get registered. |
459 | */ | 459 | */ |
460 | __acpi_register_gsi = acpi_register_gsi_xen_hvm; | 460 | __acpi_register_gsi = acpi_register_gsi_xen_hvm; |
461 | __acpi_unregister_gsi = NULL; | ||
461 | #endif | 462 | #endif |
462 | 463 | ||
463 | #ifdef CONFIG_PCI_MSI | 464 | #ifdef CONFIG_PCI_MSI |
@@ -471,52 +472,6 @@ int __init pci_xen_hvm_init(void) | |||
471 | } | 472 | } |
472 | 473 | ||
473 | #ifdef CONFIG_XEN_DOM0 | 474 | #ifdef CONFIG_XEN_DOM0 |
474 | static __init void xen_setup_acpi_sci(void) | ||
475 | { | ||
476 | int rc; | ||
477 | int trigger, polarity; | ||
478 | int gsi = acpi_sci_override_gsi; | ||
479 | int irq = -1; | ||
480 | int gsi_override = -1; | ||
481 | |||
482 | if (!gsi) | ||
483 | return; | ||
484 | |||
485 | rc = acpi_get_override_irq(gsi, &trigger, &polarity); | ||
486 | if (rc) { | ||
487 | printk(KERN_WARNING "xen: acpi_get_override_irq failed for acpi" | ||
488 | " sci, rc=%d\n", rc); | ||
489 | return; | ||
490 | } | ||
491 | trigger = trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE; | ||
492 | polarity = polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH; | ||
493 | |||
494 | printk(KERN_INFO "xen: sci override: global_irq=%d trigger=%d " | ||
495 | "polarity=%d\n", gsi, trigger, polarity); | ||
496 | |||
497 | /* Before we bind the GSI to a Linux IRQ, check whether | ||
498 | * we need to override it with bus_irq (IRQ) value. Usually for | ||
499 | * IRQs below IRQ_LEGACY_IRQ this holds IRQ == GSI, as so: | ||
500 | * ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level) | ||
501 | * but there are oddballs where the IRQ != GSI: | ||
502 | * ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 20 low level) | ||
503 | * which ends up being: gsi_to_irq[9] == 20 | ||
504 | * (which is what acpi_gsi_to_irq ends up calling when starting the | ||
505 | * the ACPI interpreter and keels over since IRQ 9 has not been | ||
506 | * setup as we had setup IRQ 20 for it). | ||
507 | */ | ||
508 | if (acpi_gsi_to_irq(gsi, &irq) == 0) { | ||
509 | /* Use the provided value if it's valid. */ | ||
510 | if (irq >= 0) | ||
511 | gsi_override = irq; | ||
512 | } | ||
513 | |||
514 | gsi = xen_register_gsi(gsi, gsi_override, trigger, polarity); | ||
515 | printk(KERN_INFO "xen: acpi sci %d\n", gsi); | ||
516 | |||
517 | return; | ||
518 | } | ||
519 | |||
520 | int __init pci_xen_initial_domain(void) | 475 | int __init pci_xen_initial_domain(void) |
521 | { | 476 | { |
522 | int irq; | 477 | int irq; |
@@ -527,8 +482,8 @@ int __init pci_xen_initial_domain(void) | |||
527 | x86_msi.restore_msi_irqs = xen_initdom_restore_msi_irqs; | 482 | x86_msi.restore_msi_irqs = xen_initdom_restore_msi_irqs; |
528 | pci_msi_ignore_mask = 1; | 483 | pci_msi_ignore_mask = 1; |
529 | #endif | 484 | #endif |
530 | xen_setup_acpi_sci(); | ||
531 | __acpi_register_gsi = acpi_register_gsi_xen; | 485 | __acpi_register_gsi = acpi_register_gsi_xen; |
486 | __acpi_unregister_gsi = NULL; | ||
532 | /* Pre-allocate legacy irqs */ | 487 | /* Pre-allocate legacy irqs */ |
533 | for (irq = 0; irq < nr_legacy_irqs(); irq++) { | 488 | for (irq = 0; irq < nr_legacy_irqs(); irq++) { |
534 | int trigger, polarity; | 489 | int trigger, polarity; |