diff options
| author | Juergen Gross <jgross@suse.com> | 2016-10-12 07:11:45 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-10-12 15:44:04 -0400 |
| commit | e311404f7925f6879817ebf471651c0bb5935604 (patch) | |
| tree | f2387d44cbf4ca1981fa4f023a7ad9dd0c7dcc7f /drivers/acpi | |
| parent | c8d2bc9bc39ebea8437fd974fdbc21847bb897a3 (diff) | |
ACPI / PAD: don't register acpi_pad driver if running as Xen dom0
When running as Xen dom0 a special processor_aggregator driver is
needed. Don't register the standard driver in this case.
Without that check an error message:
"Error: Driver 'processor_aggregator' is already registered,
aborting..."
will be displayed.
Signed-off-by: Juergen Gross <jgross@suse.com>
[ rjw: Minor fixups ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
| -rw-r--r-- | drivers/acpi/acpi_pad.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 8ea8211b2d58..eb76a4c10dbf 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
| 27 | #include <linux/acpi.h> | 27 | #include <linux/acpi.h> |
| 28 | #include <asm/mwait.h> | 28 | #include <asm/mwait.h> |
| 29 | #include <xen/xen.h> | ||
| 29 | 30 | ||
| 30 | #define ACPI_PROCESSOR_AGGREGATOR_CLASS "acpi_pad" | 31 | #define ACPI_PROCESSOR_AGGREGATOR_CLASS "acpi_pad" |
| 31 | #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator" | 32 | #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator" |
| @@ -477,6 +478,10 @@ static struct acpi_driver acpi_pad_driver = { | |||
| 477 | 478 | ||
| 478 | static int __init acpi_pad_init(void) | 479 | static int __init acpi_pad_init(void) |
| 479 | { | 480 | { |
| 481 | /* Xen ACPI PAD is used when running as Xen Dom0. */ | ||
| 482 | if (xen_initial_domain()) | ||
| 483 | return -ENODEV; | ||
| 484 | |||
| 480 | power_saving_mwait_init(); | 485 | power_saving_mwait_init(); |
| 481 | if (power_saving_mwait_eax == 0) | 486 | if (power_saving_mwait_eax == 0) |
| 482 | return -EINVAL; | 487 | return -EINVAL; |
