aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/boot/kaslr.c
diff options
context:
space:
mode:
authorAlexander Egorenkov <[email protected]>2021-06-15 14:15:07 +0200
committerHeiko Carstens <[email protected]>2021-07-27 09:39:15 +0200
commit84733284f67b1a937f6205fdb16aa5cbb8b4f53d (patch)
tree4d271615ac8c5e35ec7976f01e0722472f47b2d6 /arch/s390/boot/kaslr.c
parentf1d3c5323772a215d910aeaf697d210a3671cf81 (diff)
s390/boot: introduce boot data 'initrd_data'
The new boot data struct shall replace global variables INITRD_START and INITRD_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 <[email protected]> Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
Diffstat (limited to 'arch/s390/boot/kaslr.c')
-rw-r--r--arch/s390/boot/kaslr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/boot/kaslr.c b/arch/s390/boot/kaslr.c
index 0dd48fbdbaa4..d8984462071f 100644
--- a/arch/s390/boot/kaslr.c
+++ b/arch/s390/boot/kaslr.c
@@ -186,9 +186,9 @@ unsigned long get_random_base(unsigned long safe_addr)
*/
memory_limit -= kasan_estimate_memory_needs(memory_limit);
- if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && INITRD_START && INITRD_SIZE) {
- if (safe_addr < INITRD_START + INITRD_SIZE)
- safe_addr = INITRD_START + INITRD_SIZE;
+ if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && initrd_data.start && initrd_data.size) {
+ if (safe_addr < initrd_data.start + initrd_data.size)
+ safe_addr = initrd_data.start + initrd_data.size;
}
safe_addr = ALIGN(safe_addr, THREAD_SIZE);