summaryrefslogtreecommitdiff
path: root/drivers/s390/char/zcore.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2015-10-29 12:59:15 +0300
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-11-27 11:24:14 +0300
commit1a2c5840acf9f657c9b580d4ee12a4c9db3429cb (patch)
tree199917e7878e47e723b19788737496340ef6daef /drivers/s390/char/zcore.c
parent1a36a39e225d3558fb3776a3d3d7736cf1ec9f60 (diff)
downloadlinux-1a2c5840acf9f657c9b580d4ee12a4c9db3429cb.tar.xz
s390/dump: cleanup CPU save area handling
Introduce save_area_alloc(), save_area_boot_cpu(), save_area_add_regs() and save_area_add_vxrs to deal with storing the CPU state in case of a system dump. Remove struct save_area and save_area_ext, and create a new struct save_area as a local definition to arch/s390/kernel/crash_dump.c. Copy each individual field from the hardware status area to the save area, storing the minimum of required data. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/zcore.c')
-rw-r--r--drivers/s390/char/zcore.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/s390/char/zcore.c b/drivers/s390/char/zcore.c
index bed191a39c5b..5043ecfa1fbc 100644
--- a/drivers/s390/char/zcore.c
+++ b/drivers/s390/char/zcore.c
@@ -117,18 +117,17 @@ int memcpy_hsa_kernel(void *dest, unsigned long src, size_t count)
static int __init init_cpu_info(void)
{
- struct save_area_ext *sa_ext;
+ struct save_area *sa;
/* get info for boot cpu from lowcore, stored in the HSA */
-
- sa_ext = dump_save_areas.areas[0];
- if (!sa_ext)
+ sa = save_area_boot_cpu();
+ if (!sa)
return -ENOMEM;
- if (memcpy_hsa_kernel(&sa_ext->sa, __LC_FPREGS_SAVE_AREA,
- sizeof(struct save_area)) < 0) {
+ if (memcpy_hsa_kernel(hsa_buf, __LC_FPREGS_SAVE_AREA, 512) < 0) {
TRACE("could not copy from HSA\n");
return -EIO;
}
+ save_area_add_regs(sa, hsa_buf); /* vx registers are saved in smp.c */
return 0;
}