pvpanic: handle missing _STA correctly
authorRadim Krčmář <rkrcmar@redhat.com>
Fri, 29 May 2015 20:18:52 +0000 (22:18 +0200)
committerDarren Hart <dvhart@linux.intel.com>
Mon, 8 Jun 2015 04:30:12 +0000 (21:30 -0700)
commit55cd3f01d631b0a3a022393bac234b9a643301f6
treeb000837fad35463adf406b6663dfe2b85ac9aa71
parent4fa9dabcffc8e16601307d3d56b58c68d9716ba4
pvpanic: handle missing _STA correctly

pvpanic was not properly detected when _STA was missing.

ACPI 6.0 April 2015, 6.3.7 _STA (Status)
  If a device object (including the processor object) does not have an
  _STA object, then OSPM assumes that all of the above bits are set
  (i.e., the device is present, enabled, shown in the UI, and
  functioning).

Not adhering to the specification made pvpanic dormant under QEMU 2.3.

The original patch used acpi_bus_get_status_handle, which was not
being exported, so module build blew up;  switch to acpi_bus_get_status
and use the status it populates.

Populated status is a bitfield so we can make the code self-documenting.
We do not check 'present' because 'enabled' has to be false in that case
by specification.  Older QEMUs set 0xff to status and newer ones do 0xb.

Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
[dvhart@linux.intel.com: Merge acpi_bug_get_status fix to avoid bisect breakage]
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/pvpanic.c
This page took 0.043757 seconds and 5 git commands to generate.