aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/zcore.c
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2010-02-26 16:37:55 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-02-26 16:37:33 -0500
commit0cbde8ee60c883b246fb50dfed8bcd968239702b (patch)
treea92b33af4c69a2ed7735e03e0304d02ae7810268 /drivers/s390/char/zcore.c
parent13c6680acb3df25722858566b42759215ea5d2e0 (diff)
[S390] zcore: Add prefix registers to dump header
With this patch the prefix registers of all online CPUs are stored in the the zcore dump header. This allows dump analysis tools to access the register information that is stored in the prefix pages without using the System.map. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/zcore.c')
-rw-r--r--drivers/s390/char/zcore.c22
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
205static DEFINE_MUTEX(zcore_mutex); 205static 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
235static struct zcore_header zcore_header = { 242static struct zcore_header zcore_header = {
@@ -608,8 +615,9 @@ static int __init get_mem_size(unsigned long *mem)
608 615
609static int __init zcore_header_init(int arch, struct zcore_header *hdr) 616static 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