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>
This commit is contained in:

committed by
Martin Schwidefsky

parent
f4815ac6c9
commit
73bf463efa
@@ -428,10 +428,12 @@ static void __init setup_lowcore(void)
|
||||
lc->restart_fn = (unsigned long) do_restart;
|
||||
lc->restart_data = 0;
|
||||
lc->restart_source = -1UL;
|
||||
memcpy(&S390_lowcore.restart_stack, &lc->restart_stack,
|
||||
4*sizeof(unsigned long));
|
||||
copy_to_absolute_zero(&S390_lowcore.restart_psw,
|
||||
&lc->restart_psw, sizeof(psw_t));
|
||||
|
||||
/* Setup absolute zero lowcore */
|
||||
memcpy_absolute(&S390_lowcore.restart_stack, &lc->restart_stack,
|
||||
4 * sizeof(unsigned long));
|
||||
memcpy_absolute(&S390_lowcore.restart_psw, &lc->restart_psw,
|
||||
sizeof(lc->restart_psw));
|
||||
|
||||
set_prefix((u32)(unsigned long) lc);
|
||||
lowcore_ptr[0] = lc;
|
||||
@@ -598,7 +600,7 @@ static void __init setup_vmcoreinfo(void)
|
||||
#ifdef CONFIG_KEXEC
|
||||
unsigned long ptr = paddr_vmcoreinfo_note();
|
||||
|
||||
copy_to_absolute_zero(&S390_lowcore.vmcore_info, &ptr, sizeof(ptr));
|
||||
memcpy_absolute(&S390_lowcore.vmcore_info, &ptr, sizeof(ptr));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user