diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/nvram.c')
| -rw-r--r-- | arch/powerpc/platforms/pseries/nvram.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c index 419707b07248..00cc3a094885 100644 --- a/arch/powerpc/platforms/pseries/nvram.c +++ b/arch/powerpc/platforms/pseries/nvram.c | |||
| @@ -480,8 +480,32 @@ static void oops_to_nvram(struct kmsg_dumper *dumper, | |||
| 480 | const char *new_msgs, unsigned long new_len) | 480 | const char *new_msgs, unsigned long new_len) |
| 481 | { | 481 | { |
| 482 | static unsigned int oops_count = 0; | 482 | static unsigned int oops_count = 0; |
| 483 | static bool panicking = false; | ||
| 483 | size_t text_len; | 484 | size_t text_len; |
| 484 | 485 | ||
| 486 | switch (reason) { | ||
| 487 | case KMSG_DUMP_RESTART: | ||
| 488 | case KMSG_DUMP_HALT: | ||
| 489 | case KMSG_DUMP_POWEROFF: | ||
| 490 | /* These are almost always orderly shutdowns. */ | ||
| 491 | return; | ||
| 492 | case KMSG_DUMP_OOPS: | ||
| 493 | case KMSG_DUMP_KEXEC: | ||
| 494 | break; | ||
| 495 | case KMSG_DUMP_PANIC: | ||
| 496 | panicking = true; | ||
| 497 | break; | ||
| 498 | case KMSG_DUMP_EMERG: | ||
| 499 | if (panicking) | ||
| 500 | /* Panic report already captured. */ | ||
| 501 | return; | ||
| 502 | break; | ||
| 503 | default: | ||
| 504 | pr_err("%s: ignoring unrecognized KMSG_DUMP_* reason %d\n", | ||
| 505 | __FUNCTION__, (int) reason); | ||
| 506 | return; | ||
| 507 | } | ||
| 508 | |||
| 485 | if (clobbering_unread_rtas_event()) | 509 | if (clobbering_unread_rtas_event()) |
| 486 | return; | 510 | return; |
| 487 | 511 | ||
