Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230935
b: refs/heads/master
c: 32c361f
h: refs/heads/master
i:
  230933: 63fa2c4
  230931: f5ef763
  230927: 088ee41
v: v3
  • Loading branch information
Huang Ying authored and Len Brown committed Dec 14, 2010
1 parent 38a4cd7 commit 6434151
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f59c55d04b43bd72df8efa692dd07224fe94d1ac
refs/heads/master: 32c361f574f85fa47600d84900598e2efc99082e
25 changes: 21 additions & 4 deletions trunk/drivers/acpi/apei/ghes.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <linux/kdebug.h>
#include <linux/platform_device.h>
#include <linux/mutex.h>
#include <linux/ratelimit.h>
#include <acpi/apei.h>
#include <acpi/atomicio.h>
#include <acpi/hed.h>
Expand Down Expand Up @@ -255,11 +256,26 @@ static void ghes_do_proc(struct ghes *ghes)
}
#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)
{
/* Not more than 2 messages every 5 seconds */
static DEFINE_RATELIMIT_STATE(ratelimit, 5*HZ, 2);

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 (__ratelimit(&ratelimit)) {
printk(
"%s""Hardware error from APEI 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)
Expand All @@ -269,6 +285,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:
Expand Down

0 comments on commit 6434151

Please sign in to comment.