summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpi_pad.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-14 12:50:05 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-14 12:50:05 -0700
commitb41d037a1fd32d6535a2eef877b10f8deefeaf70 (patch)
treedaecbd26a3e80545f9d3bab99e07395aaf1b9678 /drivers/acpi/acpi_pad.c
parentef98988ba369da88bab8a4d457407e71bbe160fa (diff)
parent522533f338f38e15106d5f58901f38fe7bd6a7d8 (diff)
downloadlinux-b41d037a1fd32d6535a2eef877b10f8deefeaf70.tar.gz
linux-b41d037a1fd32d6535a2eef877b10f8deefeaf70.tar.bz2
linux-b41d037a1fd32d6535a2eef877b10f8deefeaf70.zip
Merge tag 'acpi-extra-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more ACPI updates from Rafael Wysocki: "This includes a couple of fixes needed after recent changes, two ACPI driver fixes (fan and "Processor Aggregator"), an update of the ACPI device properties handling code and a new MAINTAINERS entry for ACPI on ARM64. Specifics: - Fix an unused function warning that started to appear after recent changes in the ACPI EC driver (Eric Biggers). - Fix the KERN_CONT usage in acpi_os_vprintf() that has become (particularly) annoying recently (Joe Perches). - Fix the fan status checking in the ACPI fan driver to avoid returning incorrect error codes sometimes (Srinivas Pandruvada). - Fix the ACPI Processor Aggregator driver (PAD) to always let the special processor_aggregator driver from Xen take over when running as Xen dom0 (Juergen Gross). - Update the handling of reference device properties in ACPI by allowing empty rows ("holes") to appear in reference property lists (Mika Westerberg). - Add a new MAINTAINERS entry for ACPI on ARM64 (Lorenzo Pieralisi)" * tag 'acpi-extra-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: acpi_os_vprintf: Use printk_get_level() to avoid unnecessary KERN_CONT ACPI / PAD: don't register acpi_pad driver if running as Xen dom0 ACPI / property: Allow holes in reference properties MAINTAINERS: Add ARM64-specific ACPI maintainers entry ACPI / EC: Fix unused function warning when CONFIG_PM_SLEEP=n ACPI / fan: Fix error reading cur_state
Diffstat (limited to 'drivers/acpi/acpi_pad.c')
-rw-r--r--drivers/acpi/acpi_pad.c5
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 @@
#include <linux/slab.h>
#include <linux/acpi.h>
#include <asm/mwait.h>
+#include <xen/xen.h>
#define ACPI_PROCESSOR_AGGREGATOR_CLASS "acpi_pad"
#define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"
@@ -477,6 +478,10 @@ static struct acpi_driver acpi_pad_driver = {
static int __init acpi_pad_init(void)
{
+ /* Xen ACPI PAD is used when running as Xen Dom0. */
+ if (xen_initial_domain())
+ return -ENODEV;
+
power_saving_mwait_init();
if (power_saving_mwait_eax == 0)
return -EINVAL;