diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2020-10-09 17:14:02 +0200 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2020-11-09 11:21:00 +0100 |
commit | d7e7fbba67a32a32c3c7fe1ee6fccef93a0a8cc5 (patch) | |
tree | a5744d81168366eaa5ad129326cbd28a10689bf5 /arch/s390/boot | |
parent | 0c4ec024a481774df98910c79a4b3a105d1bb996 (diff) | |
download | linux-next-d7e7fbba67a32a32c3c7fe1ee6fccef93a0a8cc5.tar.gz |
s390/early: rewrite program parameter setup in C
And move it earlier in the decompressor.
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/boot')
-rw-r--r-- | arch/s390/boot/startup.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c index 95d13a252ed9..eeda91fcf7cc 100644 --- a/arch/s390/boot/startup.c +++ b/arch/s390/boot/startup.c @@ -2,6 +2,7 @@ #include <linux/string.h> #include <linux/elf.h> #include <asm/sections.h> +#include <asm/cpu_mf.h> #include <asm/setup.h> #include <asm/kexec.h> #include <asm/sclp.h> @@ -58,6 +59,14 @@ void error(char *x) disabled_wait(); } +static void setup_lpp(void) +{ + S390_lowcore.current_pid = 0; + S390_lowcore.lpp = LPP_MAGIC; + if (test_facility(40)) + lpp(&S390_lowcore.lpp); +} + #ifdef CONFIG_KERNEL_UNCOMPRESSED unsigned long mem_safe_offset(void) { @@ -147,6 +156,7 @@ void startup_kernel(void) unsigned long safe_addr; void *img; + setup_lpp(); store_ipl_parmblock(); safe_addr = mem_safe_offset(); safe_addr = read_ipl_report(safe_addr); |