s390/dump: streamline oldmem copy functions

Introduce two copy functions for the memory of the dumped system,
copy_oldmem_kernel() to copy to the virtual kernel address space
and copy_oldmem_user() to copy to user space.

Acked-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Martin Schwidefsky
2015-10-12 10:43:37 +02:00
parent 8a07dd02d7
commit df9694c797
6 changed files with 105 additions and 102 deletions

View File

@@ -546,8 +546,8 @@ static void __init __smp_store_cpu_state(struct save_area_ext *sa_ext,
if (is_boot_cpu) {
/* Copy the registers of the boot CPU. */
copy_oldmem_page(1, (void *) &sa_ext->sa, sizeof(sa_ext->sa),
SAVE_AREA_BASE - PAGE_SIZE, 0);
copy_oldmem_kernel(&sa_ext->sa, (void *) SAVE_AREA_BASE,
sizeof(sa_ext->sa));
if (MACHINE_HAS_VX)
save_vx_regs_safe(sa_ext->vx_regs);
return;