diff options
-rw-r--r-- | arch/x86/pci/xen.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 093f5f4272d3..1370716907e1 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c | |||
@@ -431,6 +431,14 @@ int __init pci_xen_init(void) | |||
431 | return 0; | 431 | return 0; |
432 | } | 432 | } |
433 | 433 | ||
434 | #ifdef CONFIG_PCI_MSI | ||
435 | void __init xen_msi_init(void) | ||
436 | { | ||
437 | x86_msi.setup_msi_irqs = xen_hvm_setup_msi_irqs; | ||
438 | x86_msi.teardown_msi_irq = xen_teardown_msi_irq; | ||
439 | } | ||
440 | #endif | ||
441 | |||
434 | int __init pci_xen_hvm_init(void) | 442 | int __init pci_xen_hvm_init(void) |
435 | { | 443 | { |
436 | if (!xen_have_vector_callback || !xen_feature(XENFEAT_hvm_pirqs)) | 444 | if (!xen_have_vector_callback || !xen_feature(XENFEAT_hvm_pirqs)) |
@@ -445,8 +453,11 @@ int __init pci_xen_hvm_init(void) | |||
445 | #endif | 453 | #endif |
446 | 454 | ||
447 | #ifdef CONFIG_PCI_MSI | 455 | #ifdef CONFIG_PCI_MSI |
448 | x86_msi.setup_msi_irqs = xen_hvm_setup_msi_irqs; | 456 | /* |
449 | x86_msi.teardown_msi_irq = xen_teardown_msi_irq; | 457 | * We need to wait until after x2apic is initialized |
458 | * before we can set MSI IRQ ops. | ||
459 | */ | ||
460 | x86_platform.apic_post_init = xen_msi_init; | ||
450 | #endif | 461 | #endif |
451 | return 0; | 462 | return 0; |
452 | } | 463 | } |