diff options
-rw-r--r-- | drivers/acpi/apei/ghes.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 511b971d1148..9dcb2d86aeab 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
@@ -506,16 +506,22 @@ static void __ghes_print_estatus(const char *pfx, | |||
506 | const struct acpi_hest_generic *generic, | 506 | const struct acpi_hest_generic *generic, |
507 | const struct acpi_hest_generic_status *estatus) | 507 | const struct acpi_hest_generic_status *estatus) |
508 | { | 508 | { |
509 | static atomic_t seqno; | ||
510 | unsigned int curr_seqno; | ||
511 | char pfx_seq[64]; | ||
512 | |||
509 | if (pfx == NULL) { | 513 | if (pfx == NULL) { |
510 | if (ghes_severity(estatus->error_severity) <= | 514 | if (ghes_severity(estatus->error_severity) <= |
511 | GHES_SEV_CORRECTED) | 515 | GHES_SEV_CORRECTED) |
512 | pfx = KERN_WARNING HW_ERR; | 516 | pfx = KERN_WARNING; |
513 | else | 517 | else |
514 | pfx = KERN_ERR HW_ERR; | 518 | pfx = KERN_ERR; |
515 | } | 519 | } |
520 | curr_seqno = atomic_inc_return(&seqno); | ||
521 | snprintf(pfx_seq, sizeof(pfx_seq), "%s{%u}" HW_ERR, pfx, curr_seqno); | ||
516 | printk("%s""Hardware error from APEI Generic Hardware Error Source: %d\n", | 522 | printk("%s""Hardware error from APEI Generic Hardware Error Source: %d\n", |
517 | pfx, generic->header.source_id); | 523 | pfx_seq, generic->header.source_id); |
518 | apei_estatus_print(pfx, estatus); | 524 | apei_estatus_print(pfx_seq, estatus); |
519 | } | 525 | } |
520 | 526 | ||
521 | static int ghes_print_estatus(const char *pfx, | 527 | static int ghes_print_estatus(const char *pfx, |
@@ -798,7 +804,7 @@ static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) | |||
798 | 804 | ||
799 | if (sev_global >= GHES_SEV_PANIC) { | 805 | if (sev_global >= GHES_SEV_PANIC) { |
800 | oops_begin(); | 806 | oops_begin(); |
801 | __ghes_print_estatus(KERN_EMERG HW_ERR, ghes_global->generic, | 807 | __ghes_print_estatus(KERN_EMERG, ghes_global->generic, |
802 | ghes_global->estatus); | 808 | ghes_global->estatus); |
803 | /* reboot to log the error! */ | 809 | /* reboot to log the error! */ |
804 | if (panic_timeout == 0) | 810 | if (panic_timeout == 0) |