diff options
| -rw-r--r-- | drivers/s390/char/zcore.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/s390/char/zcore.c b/drivers/s390/char/zcore.c index d688693f09b8..3438658b66b7 100644 --- a/drivers/s390/char/zcore.c +++ b/drivers/s390/char/zcore.c | |||
| @@ -204,7 +204,7 @@ static int __init init_cpu_info(enum arch_id arch) | |||
| 204 | 204 | ||
| 205 | static DEFINE_MUTEX(zcore_mutex); | 205 | static DEFINE_MUTEX(zcore_mutex); |
| 206 | 206 | ||
| 207 | #define DUMP_VERSION 0x3 | 207 | #define DUMP_VERSION 0x5 |
| 208 | #define DUMP_MAGIC 0xa8190173618f23fdULL | 208 | #define DUMP_MAGIC 0xa8190173618f23fdULL |
| 209 | #define DUMP_ARCH_S390X 2 | 209 | #define DUMP_ARCH_S390X 2 |
| 210 | #define DUMP_ARCH_S390 1 | 210 | #define DUMP_ARCH_S390 1 |
| @@ -229,7 +229,14 @@ struct zcore_header { | |||
| 229 | u32 volnr; | 229 | u32 volnr; |
| 230 | u32 build_arch; | 230 | u32 build_arch; |
| 231 | u64 rmem_size; | 231 | u64 rmem_size; |
| 232 | char pad2[4016]; | 232 | u8 mvdump; |
| 233 | u16 cpu_cnt; | ||
| 234 | u16 real_cpu_cnt; | ||
| 235 | u8 end_pad1[0x200-0x061]; | ||
| 236 | u64 mvdump_sign; | ||
| 237 | u64 mvdump_zipl_time; | ||
| 238 | u8 end_pad2[0x800-0x210]; | ||
| 239 | u32 lc_vec[512]; | ||
| 233 | } __attribute__((packed,__aligned__(16))); | 240 | } __attribute__((packed,__aligned__(16))); |
| 234 | 241 | ||
| 235 | static struct zcore_header zcore_header = { | 242 | static struct zcore_header zcore_header = { |
| @@ -608,8 +615,9 @@ static int __init get_mem_size(unsigned long *mem) | |||
| 608 | 615 | ||
| 609 | static int __init zcore_header_init(int arch, struct zcore_header *hdr) | 616 | static int __init zcore_header_init(int arch, struct zcore_header *hdr) |
| 610 | { | 617 | { |
| 611 | int rc; | 618 | int rc, i; |
| 612 | unsigned long memory = 0; | 619 | unsigned long memory = 0; |
| 620 | u32 prefix; | ||
| 613 | 621 | ||
| 614 | if (arch == ARCH_S390X) | 622 | if (arch == ARCH_S390X) |
| 615 | hdr->arch_id = DUMP_ARCH_S390X; | 623 | hdr->arch_id = DUMP_ARCH_S390X; |
| @@ -624,6 +632,14 @@ static int __init zcore_header_init(int arch, struct zcore_header *hdr) | |||
| 624 | hdr->num_pages = memory / PAGE_SIZE; | 632 | hdr->num_pages = memory / PAGE_SIZE; |
| 625 | hdr->tod = get_clock(); | 633 | hdr->tod = get_clock(); |
| 626 | get_cpu_id(&hdr->cpu_id); | 634 | get_cpu_id(&hdr->cpu_id); |
| 635 | for (i = 0; zfcpdump_save_areas[i]; i++) { | ||
| 636 | prefix = zfcpdump_save_areas[i]->pref_reg; | ||
| 637 | hdr->real_cpu_cnt++; | ||
| 638 | if (!prefix) | ||
| 639 | continue; | ||
| 640 | hdr->lc_vec[hdr->cpu_cnt] = prefix; | ||
| 641 | hdr->cpu_cnt++; | ||
| 642 | } | ||
| 627 | return 0; | 643 | return 0; |
| 628 | } | 644 | } |
| 629 | 645 | ||
