diff options
Diffstat (limited to 'arch/s390/kernel/early.c')
| -rw-r--r-- | arch/s390/kernel/early.c | 14 | 
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 068f8465c4e..f297456dba7 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c @@ -396,17 +396,19 @@ static __init void detect_machine_facilities(void)  static __init void rescue_initrd(void)  {  #ifdef CONFIG_BLK_DEV_INITRD +	unsigned long min_initrd_addr = (unsigned long) _end + (4UL << 20);  	/* -	 * Move the initrd right behind the bss section in case it starts -	 * within the bss section. So we don't overwrite it when the bss -	 * section gets cleared. +	 * Just like in case of IPL from VM reader we make sure there is a +	 * gap of 4MB between end of kernel and start of initrd. +	 * That way we can also be sure that saving an NSS will succeed, +	 * which however only requires different segments.  	 */  	if (!INITRD_START || !INITRD_SIZE)  		return; -	if (INITRD_START >= (unsigned long) __bss_stop) +	if (INITRD_START >= min_initrd_addr)  		return; -	memmove(__bss_stop, (void *) INITRD_START, INITRD_SIZE); -	INITRD_START = (unsigned long) __bss_stop; +	memmove((void *) min_initrd_addr, (void *) INITRD_START, INITRD_SIZE); +	INITRD_START = min_initrd_addr;  #endif  }  |