[S390] Cleanup struct _lowcore usage and defines.
Use asm offsets to make sure the offset defines to struct _lowcore and its layout don't get out of sync. Also add a BUILD_BUG_ON() which checks that the size of the structure is sane. And while being at it change those sites which use odd casts to access the current lowcore. These should use S390_lowcore instead. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
committed by
Martin Schwidefsky
parent
d96221ab1e
commit
cbb870c822
@ -1917,7 +1917,6 @@ void __init ipl_update_parameters(void)
|
||||
void __init ipl_save_parameters(void)
|
||||
{
|
||||
struct cio_iplinfo iplinfo;
|
||||
unsigned int *ipl_ptr;
|
||||
void *src, *dst;
|
||||
|
||||
if (cio_get_iplinfo(&iplinfo))
|
||||
@ -1928,11 +1927,10 @@ void __init ipl_save_parameters(void)
|
||||
if (!iplinfo.is_qdio)
|
||||
return;
|
||||
ipl_flags |= IPL_PARMBLOCK_VALID;
|
||||
ipl_ptr = (unsigned int *)__LC_IPL_PARMBLOCK_PTR;
|
||||
src = (void *)(unsigned long)*ipl_ptr;
|
||||
src = (void *)(unsigned long)S390_lowcore.ipl_parmblock_ptr;
|
||||
dst = (void *)IPL_PARMBLOCK_ORIGIN;
|
||||
memmove(dst, src, PAGE_SIZE);
|
||||
*ipl_ptr = IPL_PARMBLOCK_ORIGIN;
|
||||
S390_lowcore.ipl_parmblock_ptr = IPL_PARMBLOCK_ORIGIN;
|
||||
}
|
||||
|
||||
static LIST_HEAD(rcall);
|
||||
|
Reference in New Issue
Block a user