summaryrefslogtreecommitdiff
path: root/arch/um/kernel/initrd.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2017-04-27 06:15:10 +0300
committerRichard Weinberger <richard@nod.at>2017-05-03 23:38:16 +0300
commit5b4236e17cc1bd9fa14b2b0c7a4ae632d41f2e20 (patch)
treeece1dff46ebb0f66add8226030fdc1addbf0d526 /arch/um/kernel/initrd.c
parent601b7b9147455a4d8d80d04f0e5a1eb222301bbe (diff)
downloadlinux-5b4236e17cc1bd9fa14b2b0c7a4ae632d41f2e20.tar.xz
um: Fix to call read_initrd after init_bootmem
Since read_initrd() invokes alloc_bootmem() for allocating memory to load initrd image, it must be called after init_bootmem. This makes read_initrd() called directly from setup_arch() after init_bootmem() and mem_total_pages(). Cc: <stable@vger.kernel.org> Fixes: b63236972e1 ("um: Setup physical memory in setup_arch()") Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel/initrd.c')
-rw-r--r--arch/um/kernel/initrd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c
index 48bae81f8dca..6f6e7896e53f 100644
--- a/arch/um/kernel/initrd.c
+++ b/arch/um/kernel/initrd.c
@@ -14,7 +14,7 @@
static char *initrd __initdata = NULL;
static int load_initrd(char *filename, void *buf, int size);
-static int __init read_initrd(void)
+int __init read_initrd(void)
{
void *area;
long long size;
@@ -46,8 +46,6 @@ static int __init read_initrd(void)
return 0;
}
-__uml_postsetup(read_initrd);
-
static int __init uml_initrd_setup(char *line, int *add)
{
initrd = line;