Skip to content

Commit 0cbde8e

Browse files
Michael HolzheuMartin Schwidefsky
authored andcommitted
[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>
1 parent 13c6680 commit 0cbde8e

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

‎drivers/s390/char/zcore.c‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static int __init init_cpu_info(enum arch_id arch)
204204

205205
static DEFINE_MUTEX(zcore_mutex);
206206

207-
#define DUMP_VERSION 0x3
207+
#define DUMP_VERSION 0x5
208208
#define DUMP_MAGIC 0xa8190173618f23fdULL
209209
#define DUMP_ARCH_S390X 2
210210
#define DUMP_ARCH_S390 1
@@ -229,7 +229,14 @@ struct zcore_header {
229229
u32 volnr;
230230
u32 build_arch;
231231
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];
233240
} __attribute__((packed,__aligned__(16)));
234241

235242
static struct zcore_header zcore_header = {
@@ -608,8 +615,9 @@ static int __init get_mem_size(unsigned long *mem)
608615

609616
static int __init zcore_header_init(int arch, struct zcore_header *hdr)
610617
{
611-
int rc;
618+
int rc, i;
612619
unsigned long memory = 0;
620+
u32 prefix;
613621

614622
if (arch == ARCH_S390X)
615623
hdr->arch_id = DUMP_ARCH_S390X;
@@ -624,6 +632,14 @@ static int __init zcore_header_init(int arch, struct zcore_header *hdr)
624632
hdr->num_pages = memory / PAGE_SIZE;
625633
hdr->tod = get_clock();
626634
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+
}
627643
return 0;
628644
}
629645

0 commit comments

Comments
 (0)