aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/setup.c
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2012-05-24 08:35:16 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-05-30 03:04:49 -0400
commit73bf463efaba6a1efe69349c6d7275d03468adf4 (patch)
tree66a5c2eb6cc72bd8e627ba88931a23e1fdb25248 /arch/s390/kernel/setup.c
parentf4815ac6c935b8e441fe12504d62e0e8ff7f7ce5 (diff)
s390/kernel: Introduce memcpy_absolute() function
This patch introduces the new function memcpy_absolute() that allows to copy memory using absolute addressing. This means that the prefix swap does not apply when this function is used. With this patch also all s390 kernel code that accesses absolute zero now uses the new memcpy_absolute() function. The old and less generic copy_to_absolute_zero() function is removed. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r--arch/s390/kernel/setup.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 06264ae8ccd9..489d1d8d96b0 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -428,10 +428,12 @@ static void __init setup_lowcore(void)
428 lc->restart_fn = (unsigned long) do_restart; 428 lc->restart_fn = (unsigned long) do_restart;
429 lc->restart_data = 0; 429 lc->restart_data = 0;
430 lc->restart_source = -1UL; 430 lc->restart_source = -1UL;
431 memcpy(&S390_lowcore.restart_stack, &lc->restart_stack, 431
432 4*sizeof(unsigned long)); 432 /* Setup absolute zero lowcore */
433 copy_to_absolute_zero(&S390_lowcore.restart_psw, 433 memcpy_absolute(&S390_lowcore.restart_stack, &lc->restart_stack,
434 &lc->restart_psw, sizeof(psw_t)); 434 4 * sizeof(unsigned long));
435 memcpy_absolute(&S390_lowcore.restart_psw, &lc->restart_psw,
436 sizeof(lc->restart_psw));
435 437
436 set_prefix((u32)(unsigned long) lc); 438 set_prefix((u32)(unsigned long) lc);
437 lowcore_ptr[0] = lc; 439 lowcore_ptr[0] = lc;
@@ -598,7 +600,7 @@ static void __init setup_vmcoreinfo(void)
598#ifdef CONFIG_KEXEC 600#ifdef CONFIG_KEXEC
599 unsigned long ptr = paddr_vmcoreinfo_note(); 601 unsigned long ptr = paddr_vmcoreinfo_note();
600 602
601 copy_to_absolute_zero(&S390_lowcore.vmcore_info, &ptr, sizeof(ptr)); 603 memcpy_absolute(&S390_lowcore.vmcore_info, &ptr, sizeof(ptr));
602#endif 604#endif
603} 605}
604 606