summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-05-07 19:12:39 +0200
committerVasily Gorbik <gor@linux.ibm.com>2021-06-07 17:06:59 +0200
commitf73c632d387a5f1528cca6032c646489610bec13 (patch)
tree49dadc76f703e6b1a1b56080c9ce007353061740
parents390/sclp_vt220: fix console name to match device (diff)
downloadlinux-f73c632d387a5f1528cca6032c646489610bec13.tar.xz
linux-f73c632d387a5f1528cca6032c646489610bec13.zip
s390/ipl: make parameter area accessible via struct parmarea
Since commit 9a965ea95135 ("s390/kexec_file: Simplify parmarea access") we have struct parmarea which describes the layout of the kernel parameter area. Make the kernel parameter area available as global variable parmarea of type struct parmarea, which allows to easily access its members. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r--arch/s390/boot/head.S3
-rw-r--r--arch/s390/include/asm/setup.h2
-rw-r--r--arch/s390/kernel/asm-offsets.c3
3 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/boot/head.S b/arch/s390/boot/head.S
index dacb7813f982..51693cfb65c2 100644
--- a/arch/s390/boot/head.S
+++ b/arch/s390/boot/head.S
@@ -401,6 +401,7 @@ SYM_CODE_END(startup_pgm_check_handler)
# Must be keept in sync with struct parmarea in setup.h
#
.org PARMAREA
+SYM_DATA_START(parmarea)
.quad 0 # IPL_DEVICE
.quad 0 # INITRD_START
.quad 0 # INITRD_SIZE
@@ -411,6 +412,8 @@ SYM_CODE_END(startup_pgm_check_handler)
.org COMMAND_LINE
.byte "root=/dev/ram0 ro"
.byte 0
+ .org PARMAREA+__PARMAREA_SIZE
+SYM_DATA_END(parmarea)
.org EARLY_SCCB_OFFSET
.fill 4096
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h
index 3e388fa208d4..29baab03f091 100644
--- a/arch/s390/include/asm/setup.h
+++ b/arch/s390/include/asm/setup.h
@@ -78,6 +78,8 @@ struct parmarea {
char command_line[ARCH_COMMAND_LINE_SIZE]; /* 0x10480 */
};
+extern struct parmarea parmarea;
+
extern unsigned int zlib_dfltcc_support;
#define ZLIB_DFLTCC_DISABLED 0
#define ZLIB_DFLTCC_FULL 1
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c
index b4ca7cc011cb..f53605a3dfcd 100644
--- a/arch/s390/kernel/asm-offsets.c
+++ b/arch/s390/kernel/asm-offsets.c
@@ -15,6 +15,7 @@
#include <asm/idle.h>
#include <asm/gmap.h>
#include <asm/nmi.h>
+#include <asm/setup.h>
#include <asm/stacktrace.h>
int main(void)
@@ -155,5 +156,7 @@ int main(void)
OFFSET(__KEXEC_SHA_REGION_START, kexec_sha_region, start);
OFFSET(__KEXEC_SHA_REGION_LEN, kexec_sha_region, len);
DEFINE(__KEXEC_SHA_REGION_SIZE, sizeof(struct kexec_sha_region));
+ /* sizeof kernel parameter area */
+ DEFINE(__PARMAREA_SIZE, sizeof(struct parmarea));
return 0;
}