* [PATCH 0/3] ACPI, APEI, Fixes for 3.0
@ 2011-06-28 1:13 Huang Ying
2011-06-28 1:13 ` [PATCH 1/3] ACPI, APEI, HEST, Detect duplicated hardware error source ID Huang Ying
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Huang Ying @ 2011-06-28 1:13 UTC (permalink / raw)
To: Len Brown; +Cc: linux-kernel, Andi Kleen, Tony Luck, ying.huang, linux-acpi
[PATCH 1/3] ACPI, APEI, HEST, Detect duplicated hardware error source ID
[PATCH 2/3] ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled
[PATCH 3/3] ACPI, APEI, ERST, Fix erst-dbg long record reading issue
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] ACPI, APEI, HEST, Detect duplicated hardware error source ID
2011-06-28 1:13 [PATCH 0/3] ACPI, APEI, Fixes for 3.0 Huang Ying
@ 2011-06-28 1:13 ` Huang Ying
2011-06-28 1:13 ` [PATCH 2/3] ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled Huang Ying
2011-06-28 1:13 ` [PATCH 3/3] ACPI, APEI, ERST, Fix erst-dbg long record reading issue Huang Ying
2 siblings, 0 replies; 4+ messages in thread
From: Huang Ying @ 2011-06-28 1:13 UTC (permalink / raw)
To: Len Brown; +Cc: linux-kernel, Andi Kleen, Tony Luck, ying.huang, linux-acpi
The firmware on some machine will report duplicated hardware error
source ID in HEST. This is considered a firmware bug. To provide
better warning message, this patch adds duplicated hardware error
source ID detecting and corresponding printk.
This patch fixes #37412 on kernel bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=37412
Reported-by: marconifabio@ubuntu-it.org
Signed-off-by: Huang Ying <ying.huang@intel.com>
Tested-by: Mathias <janedo.spam@gmail.com>
---
drivers/acpi/apei/hest.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -139,13 +139,23 @@ static int __init hest_parse_ghes(struct
{
struct platform_device *ghes_dev;
struct ghes_arr *ghes_arr = data;
- int rc;
+ int rc, i;
if (hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR)
return 0;
if (!((struct acpi_hest_generic *)hest_hdr)->enabled)
return 0;
+ for (i = 0; i < ghes_arr->count; i++) {
+ struct acpi_hest_header *hdr;
+ ghes_dev = ghes_arr->ghes_devs[i];
+ hdr = *(struct acpi_hest_header **)ghes_dev->dev.platform_data;
+ if (hdr->source_id == hest_hdr->source_id) {
+ pr_warning(FW_WARN HEST_PFX "Duplicated hardware error source ID: %d.\n",
+ hdr->source_id);
+ return -EIO;
+ }
+ }
ghes_dev = platform_device_alloc("GHES", hest_hdr->source_id);
if (!ghes_dev)
return -ENOMEM;
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/3] ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled
2011-06-28 1:13 [PATCH 0/3] ACPI, APEI, Fixes for 3.0 Huang Ying
2011-06-28 1:13 ` [PATCH 1/3] ACPI, APEI, HEST, Detect duplicated hardware error source ID Huang Ying
@ 2011-06-28 1:13 ` Huang Ying
2011-06-28 1:13 ` [PATCH 3/3] ACPI, APEI, ERST, Fix erst-dbg long record reading issue Huang Ying
2 siblings, 0 replies; 4+ messages in thread
From: Huang Ying @ 2011-06-28 1:13 UTC (permalink / raw)
To: Len Brown; +Cc: linux-kernel, Andi Kleen, Tony Luck, ying.huang, linux-acpi
erst_dbg module can not work with ERST is disabled. So disable module
loading to provide clearer information to user.
Signed-off-by: Huang Ying <ying.huang@intel.com>
---
drivers/acpi/apei/erst-dbg.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/acpi/apei/erst-dbg.c
+++ b/drivers/acpi/apei/erst-dbg.c
@@ -213,6 +213,10 @@ static struct miscdevice erst_dbg_dev =
static __init int erst_dbg_init(void)
{
+ if (erst_disable) {
+ pr_info(ERST_DBG_PFX "ERST support is disabled.\n");
+ return -ENODEV;
+ }
return misc_register(&erst_dbg_dev);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3] ACPI, APEI, ERST, Fix erst-dbg long record reading issue
2011-06-28 1:13 [PATCH 0/3] ACPI, APEI, Fixes for 3.0 Huang Ying
2011-06-28 1:13 ` [PATCH 1/3] ACPI, APEI, HEST, Detect duplicated hardware error source ID Huang Ying
2011-06-28 1:13 ` [PATCH 2/3] ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled Huang Ying
@ 2011-06-28 1:13 ` Huang Ying
2 siblings, 0 replies; 4+ messages in thread
From: Huang Ying @ 2011-06-28 1:13 UTC (permalink / raw)
To: Len Brown
Cc: linux-kernel, Andi Kleen, Tony Luck, ying.huang, linux-acpi, Chen Gong
From: Chen Gong <gong.chen@linux.intel.com>
When we debug ERST table with erst-dbg, if the error record in ERST
table is too long(>4K), it can't be read out. So this patch increases
the buffer size to 16K to ensure such error records can be read from
ERST table.
Signed-off-by: Chen Gong <gong.chen@linux.intel.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
---
drivers/acpi/apei/erst-dbg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/acpi/apei/erst-dbg.c
+++ b/drivers/acpi/apei/erst-dbg.c
@@ -33,7 +33,7 @@
#define ERST_DBG_PFX "ERST DBG: "
-#define ERST_DBG_RECORD_LEN_MAX 4096
+#define ERST_DBG_RECORD_LEN_MAX 0x4000
static void *erst_dbg_buf;
static unsigned int erst_dbg_buf_len;
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-28 1:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-28 1:13 [PATCH 0/3] ACPI, APEI, Fixes for 3.0 Huang Ying
2011-06-28 1:13 ` [PATCH 1/3] ACPI, APEI, HEST, Detect duplicated hardware error source ID Huang Ying
2011-06-28 1:13 ` [PATCH 2/3] ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled Huang Ying
2011-06-28 1:13 ` [PATCH 3/3] ACPI, APEI, ERST, Fix erst-dbg long record reading issue Huang Ying
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®