From patchwork Tue Jun 21 07:16:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 899982 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5L7HHaX013876 for ; Tue, 21 Jun 2011 07:17:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753188Ab1FUHQi (ORCPT ); Tue, 21 Jun 2011 03:16:38 -0400 Received: from mga02.intel.com ([134.134.136.20]:15302 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753012Ab1FUHQg (ORCPT ); Tue, 21 Jun 2011 03:16:36 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 21 Jun 2011 00:16:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,399,1304319600"; d="scan'208";a="16258857" Received: from yhuang-dev.sh.intel.com ([10.239.13.105]) by orsmga002.jf.intel.com with ESMTP; 21 Jun 2011 00:16:34 -0700 From: Huang Ying To: Len Brown Cc: linux-kernel@vger.kernel.org, Andi Kleen , Tony Luck , ying.huang@intel.com, linux-acpi@vger.kernel.org, mjg59@srcf.ucam.org Subject: [PATCH 3/4] ACPI, APEI, Add APEI bit support in generic _OSC call Date: Tue, 21 Jun 2011 15:16:26 +0800 Message-Id: <1308640587-24502-4-git-send-email-ying.huang@intel.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1308640587-24502-1-git-send-email-ying.huang@intel.com> References: <1308640587-24502-1-git-send-email-ying.huang@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 21 Jun 2011 07:17:18 +0000 (UTC) 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 --- drivers/acpi/bus.c | 6 ++++++ 1 file changed, 6 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -541,6 +542,11 @@ static void acpi_bus_osc_support(void) #if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE) capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_PPC_OST_SUPPORT; #endif + +#ifdef CONFIG_ACPI_APEI_GHES + if (!ghes_disable) + capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_APEI_SUPPORT; +#endif if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle))) return; if (ACPI_SUCCESS(acpi_run_osc(handle, &context)))