[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181008175623.826535321@linuxfoundation.org>
Date: Mon, 8 Oct 2018 20:31:19 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Guenter Roeck <linux@...ck-us.net>,
Palmer Dabbelt <palmer@...ive.com>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.18 099/168] riscv: Do not overwrite initrd_start and initrd_end
4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <linux@...ck-us.net>
[ Upstream commit e866d3e84eb7c9588afb77604d417e8cc49fe216 ]
setup_initrd() overwrites initrd_start and initrd_end if __initramfs_size
is larger than 0, which is always true even if there is no embedded
initramfs. This prevents booting qemu with "-initrd" parameter.
Overwriting initrd_start and initrd_end is not necessary since
__initramfs_start and __initramfs_size are used directly in
populate_rootfs() to load the built-in initramfs, so just drop
that code.
Signed-off-by: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Palmer Dabbelt <palmer@...ive.com>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
arch/riscv/kernel/setup.c | 7 -------
1 file changed, 7 deletions(-)
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -64,15 +64,8 @@ atomic_t hart_lottery;
#ifdef CONFIG_BLK_DEV_INITRD
static void __init setup_initrd(void)
{
- extern char __initramfs_start[];
- extern unsigned long __initramfs_size;
unsigned long size;
- if (__initramfs_size > 0) {
- initrd_start = (unsigned long)(&__initramfs_start);
- initrd_end = initrd_start + __initramfs_size;
- }
-
if (initrd_start >= initrd_end) {
printk(KERN_INFO "initrd not found or empty");
goto disable;
Powered by blists - more mailing lists