[PATCH 3/4] ACPI, APEI, Add APEI bit support in generic _OSC call

From: Huang Ying
Date: Tue Jun 21 2011 - 03:16:45 EST

In APEI firmware first mode, hardware error is reported by hardware to
firmware firstly, then firmware reports the error to Linux in a GHES
error record via POLL/SCI/IRQ/NMI etc.

This may result in some issues if OS has no full APEI support. So
some firmware implementation will work in a back-compatible mode by
default. Where firmware will only notify OS in old-fashion, without
GHES record. For example, for a fatal hardware error, only NMI is
signaled, no GHES record.

To gain full APEI power on these machines, APEI bit in generic _OSC
call should be specified to tell firmware that Linux has full APEI
support. This patch adds the APEI bit support in generic _OSC call.

Signed-off-by: Huang Ying <ying.huang@xxxxxxxxx>
drivers/acpi/bus.c | 6 ++++++
1 file changed, 6 insertions(+)

--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -39,6 +39,7 @@
#include <linux/pci.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
+#include <acpi/apei.h>
#include <linux/dmi.h>
#include <linux/suspend.h>

@@ -541,6 +542,11 @@ static void acpi_bus_osc_support(void)
+ if (!ghes_disable)
if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
if (ACPI_SUCCESS(acpi_run_osc(handle, &context)))
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/