aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/pseries/nvram.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c
index 6c4dc52ac0b5..d276cd3edd8f 100644
--- a/arch/powerpc/platforms/pseries/nvram.c
+++ b/arch/powerpc/platforms/pseries/nvram.c
@@ -581,6 +581,9 @@ static int nvram_pstore_write(enum pstore_type_id type,
581 oops_hdr->report_length = (u16) size; 581 oops_hdr->report_length = (u16) size;
582 oops_hdr->timestamp = get_seconds(); 582 oops_hdr->timestamp = get_seconds();
583 583
584 if (compressed)
585 err_type = ERR_TYPE_KERNEL_PANIC_GZ;
586
584 rc = nvram_write_os_partition(&oops_log_partition, oops_buf, 587 rc = nvram_write_os_partition(&oops_log_partition, oops_buf,
585 (int) (sizeof(*oops_hdr) + size), err_type, count); 588 (int) (sizeof(*oops_hdr) + size), err_type, count);
586 589
@@ -687,6 +690,11 @@ static ssize_t nvram_pstore_read(u64 *id, enum pstore_type_id *type,
687 return -ENOMEM; 690 return -ENOMEM;
688 memcpy(*buf, buff + hdr_size, length); 691 memcpy(*buf, buff + hdr_size, length);
689 kfree(buff); 692 kfree(buff);
693
694 if (err_type == ERR_TYPE_KERNEL_PANIC_GZ)
695 *compressed = true;
696 else
697 *compressed = false;
690 return length; 698 return length;
691 } 699 }
692 700