From patchwork Wed Nov 24 01:16:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 351461 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAO1IEI6004502 for ; Wed, 24 Nov 2010 01:18:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756369Ab0KXBRd (ORCPT ); Tue, 23 Nov 2010 20:17:33 -0500 Received: from mga11.intel.com ([192.55.52.93]:27535 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756350Ab0KXBRc (ORCPT ); Tue, 23 Nov 2010 20:17:32 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 23 Nov 2010 17:17:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,245,1288594800"; d="scan'208";a="860781809" Received: from yhuang-dev.sh.intel.com ([10.239.13.2]) by fmsmga001.fm.intel.com with ESMTP; 23 Nov 2010 17:17:30 -0800 From: Huang Ying To: Len Brown Cc: linux-kernel@vger.kernel.org, Andi Kleen , ying.huang@intel.com, linux-acpi@vger.kernel.org, Peter Zijlstra , Andrew Morton , Linus Torvalds , Ingo Molnar , Mauro Carvalho Chehab , Borislav Petkov , Thomas Gleixner Subject: [RFC][PATCH 3/3] ACPI, APEI, report GHES error information via printk Date: Wed, 24 Nov 2010 09:16:54 +0800 Message-Id: <1290561414-13313-4-git-send-email-ying.huang@intel.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1290561414-13313-1-git-send-email-ying.huang@intel.com> References: <1290561414-13313-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.3 (demeter1.kernel.org [140.211.167.41]); Wed, 24 Nov 2010 01:18:15 +0000 (UTC) --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -255,11 +255,23 @@ static void ghes_do_proc(struct ghes *gh } #endif } +} - if (!processed && printk_ratelimit()) - pr_warning(GHES_PFX - "Unknown error record from generic hardware error source: %d\n", - ghes->generic->header.source_id); +static void ghes_print_estatus(const char *pfx, struct ghes *ghes) +{ + if (pfx == NULL) { + if (ghes_severity(ghes->estatus->error_severity) <= + GHES_SEV_CORRECTED) + pfx = KERN_WARNING HW_ERR; + else + pfx = KERN_ERR HW_ERR; + } + if (printk_ratelimit()) { + printk( + "%sHardware error from Generic Hardware Error Source: %d\n", + pfx, ghes->generic->header.source_id); + apei_estatus_print(pfx, ghes->estatus); + } } static int ghes_proc(struct ghes *ghes) @@ -269,6 +281,7 @@ static int ghes_proc(struct ghes *ghes) rc = ghes_read_estatus(ghes, 0); if (rc) goto out; + ghes_print_estatus(NULL, ghes); ghes_do_proc(ghes); out: