From e9e7870f90e3587b712e05db2ded947a3f617119 Mon Sep 17 00:00:00 2001 From: Alexander Egorenkov Date: Tue, 15 Jun 2021 14:25:41 +0200 Subject: s390/dump: introduce boot data 'oldmem_data' The new boot data struct shall replace global variables OLDMEM_BASE and OLDMEM_SIZE. It is initialized in the decompressor and passed to the decompressed kernel. In comparison to the old solution, this one doesn't access data at fixed physical addresses which will become important when the decompressor becomes relocatable. Signed-off-by: Alexander Egorenkov Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens --- arch/s390/boot/startup.c | 7 +++++-- arch/s390/boot/uv.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'arch/s390/boot') diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c index 694780339db0..6206ca149d5e 100644 --- a/arch/s390/boot/startup.c +++ b/arch/s390/boot/startup.c @@ -27,6 +27,7 @@ struct initrd_data __bootdata(initrd_data); u64 __bootdata_preserved(stfle_fac_list[16]); u64 __bootdata_preserved(alt_stfle_fac_list[16]); +struct oldmem_data __bootdata_preserved(oldmem_data); /* * Some code and data needs to stay below 2 GB, even when the kernel would be @@ -165,9 +166,9 @@ static void setup_ident_map_size(unsigned long max_physmem_end) ident_map_size = min(ident_map_size, 1UL << MAX_PHYSMEM_BITS); #ifdef CONFIG_CRASH_DUMP - if (OLDMEM_BASE) { + if (oldmem_data.start) { kaslr_enabled = 0; - ident_map_size = min(ident_map_size, OLDMEM_SIZE); + ident_map_size = min(ident_map_size, oldmem_data.size); } else if (ipl_block_valid && is_ipl_block_dump()) { kaslr_enabled = 0; if (!sclp_early_get_hsa_size(&hsa_size) && hsa_size) @@ -286,6 +287,8 @@ void startup_kernel(void) initrd_data.start = parmarea.initrd_start; initrd_data.size = parmarea.initrd_size; + oldmem_data.start = parmarea.oldmem_base; + oldmem_data.size = parmarea.oldmem_size; setup_lpp(); store_ipl_parmblock(); diff --git a/arch/s390/boot/uv.c b/arch/s390/boot/uv.c index 735f29f81162..e6be155ab2e5 100644 --- a/arch/s390/boot/uv.c +++ b/arch/s390/boot/uv.c @@ -69,7 +69,7 @@ static int is_prot_virt_host_capable(void) if (!test_facility(158)) return 0; /* disable if kdump */ - if (OLDMEM_BASE) + if (oldmem_data.start) return 0; /* disable if stand-alone dump */ if (ipl_block_valid && is_ipl_block_dump()) -- cgit v1.2.3