Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262351
b: refs/heads/master
c: 5588340
h: refs/heads/master
i:
  262349: 39cb7fe
  262347: eebeccf
  262343: 56cd50a
  262335: abff231
v: v3
  • Loading branch information
Huang Ying authored and Len Brown committed Jul 14, 2011
1 parent fa4f833 commit 904774d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 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: d37afc50e618271839f001ea653949eefc728167
refs/heads/master: 5588340d46a484da53bbce8136184d9c7fbc259c
25 changes: 14 additions & 11 deletions trunk/drivers/acpi/apei/ghes.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,24 +360,27 @@ static void ghes_do_proc(struct ghes *ghes)
}
}

static void ghes_print_estatus(const char *pfx, struct ghes *ghes)
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);
}
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 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 (__ratelimit(&ratelimit))
__ghes_print_estatus(pfx, ghes);
}

static int ghes_proc(struct ghes *ghes)
Expand Down Expand Up @@ -476,7 +479,7 @@ static int ghes_notify_nmi(struct notifier_block *this,

if (sev_global >= GHES_SEV_PANIC) {
oops_begin();
ghes_print_estatus(KERN_EMERG HW_ERR, ghes_global);
__ghes_print_estatus(KERN_EMERG HW_ERR, ghes_global);
/* reboot to log the error! */
if (panic_timeout == 0)
panic_timeout = ghes_panic_timeout;
Expand Down

0 comments on commit 904774d

Please sign in to comment.