diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-07-06 10:41:47 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-07-11 13:19:27 -0400 |
commit | d92edd814e3c9d9105de55b14c8958b1f8f20269 (patch) | |
tree | ee78b5cdd78e9813472b230b404498ab525c26f3 /arch/x86/pci | |
parent | 996c34aee3525c0ef91052af0e425e87d83ba6e0 (diff) |
xen/pci: Provide #ifdef CONFIG_ACPI to easy code squashing.
In the past we would guard those code segments to be dependent
on CONFIG_XEN_DOM0 (which depends on CONFIG_ACPI) so this patch is
not stricly necessary. But the next patch will merge common
HVM and initial domain code and we want to make sure the CONFIG_ACPI
dependency is preserved - as HVM code does not depend on CONFIG_XEN_DOM0.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/pci')
-rw-r--r-- | arch/x86/pci/xen.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 76b39804413c..7ee39cc38a2d 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c | |||
@@ -101,6 +101,7 @@ static int acpi_register_gsi_xen_hvm(struct device *dev, u32 gsi, | |||
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | #ifdef CONFIG_XEN_DOM0 | 103 | #ifdef CONFIG_XEN_DOM0 |
104 | #ifdef CONFIG_ACPI | ||
104 | static int xen_register_pirq(u32 gsi, int gsi_override, int triggering) | 105 | static int xen_register_pirq(u32 gsi, int gsi_override, int triggering) |
105 | { | 106 | { |
106 | int rc, pirq, irq = -1; | 107 | int rc, pirq, irq = -1; |
@@ -180,6 +181,7 @@ static int acpi_register_gsi_xen(struct device *dev, u32 gsi, | |||
180 | return xen_register_gsi(gsi, -1 /* no GSI override */, trigger, polarity); | 181 | return xen_register_gsi(gsi, -1 /* no GSI override */, trigger, polarity); |
181 | } | 182 | } |
182 | #endif | 183 | #endif |
184 | #endif | ||
183 | 185 | ||
184 | #if defined(CONFIG_PCI_MSI) | 186 | #if defined(CONFIG_PCI_MSI) |
185 | #include <linux/msi.h> | 187 | #include <linux/msi.h> |
@@ -409,6 +411,7 @@ int __init pci_xen_hvm_init(void) | |||
409 | } | 411 | } |
410 | 412 | ||
411 | #ifdef CONFIG_XEN_DOM0 | 413 | #ifdef CONFIG_XEN_DOM0 |
414 | #ifdef CONFIG_ACPI | ||
412 | static __init void xen_setup_acpi_sci(void) | 415 | static __init void xen_setup_acpi_sci(void) |
413 | { | 416 | { |
414 | int rc; | 417 | int rc; |
@@ -455,16 +458,17 @@ static __init void xen_setup_acpi_sci(void) | |||
455 | 458 | ||
456 | return; | 459 | return; |
457 | } | 460 | } |
458 | 461 | #endif | |
459 | static int __init pci_xen_initial_domain(void) | 462 | static int __init pci_xen_initial_domain(void) |
460 | { | 463 | { |
461 | #ifdef CONFIG_PCI_MSI | 464 | #ifdef CONFIG_PCI_MSI |
462 | x86_msi.setup_msi_irqs = xen_initdom_setup_msi_irqs; | 465 | x86_msi.setup_msi_irqs = xen_initdom_setup_msi_irqs; |
463 | x86_msi.teardown_msi_irq = xen_teardown_msi_irq; | 466 | x86_msi.teardown_msi_irq = xen_teardown_msi_irq; |
464 | #endif | 467 | #endif |
468 | #ifdef CONFIG_ACPI | ||
465 | xen_setup_acpi_sci(); | 469 | xen_setup_acpi_sci(); |
466 | __acpi_register_gsi = acpi_register_gsi_xen; | 470 | __acpi_register_gsi = acpi_register_gsi_xen; |
467 | 471 | #endif | |
468 | return 0; | 472 | return 0; |
469 | } | 473 | } |
470 | 474 | ||
@@ -484,7 +488,7 @@ void __init xen_setup_pirqs(void) | |||
484 | } | 488 | } |
485 | return; | 489 | return; |
486 | } | 490 | } |
487 | 491 | #ifdef CONFIG_ACPI | |
488 | /* Pre-allocate legacy irqs */ | 492 | /* Pre-allocate legacy irqs */ |
489 | for (irq = 0; irq < NR_IRQS_LEGACY; irq++) { | 493 | for (irq = 0; irq < NR_IRQS_LEGACY; irq++) { |
490 | int trigger, polarity; | 494 | int trigger, polarity; |
@@ -495,6 +499,7 @@ void __init xen_setup_pirqs(void) | |||
495 | xen_register_pirq(irq, -1 /* no GSI override */, | 499 | xen_register_pirq(irq, -1 /* no GSI override */, |
496 | trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE); | 500 | trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE); |
497 | } | 501 | } |
502 | #endif | ||
498 | } | 503 | } |
499 | 504 | ||
500 | struct xen_device_domain_owner { | 505 | struct xen_device_domain_owner { |