diff options
Diffstat (limited to 'arch/riscv/kernel/setup.c')
| -rw-r--r-- | arch/riscv/kernel/setup.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index fc8006a042eb..77564310235f 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c | |||
| @@ -149,7 +149,14 @@ asmlinkage void __init setup_vm(void) | |||
| 149 | 149 | ||
| 150 | void __init parse_dtb(unsigned int hartid, void *dtb) | 150 | void __init parse_dtb(unsigned int hartid, void *dtb) |
| 151 | { | 151 | { |
| 152 | early_init_dt_scan(__va(dtb)); | 152 | if (!early_init_dt_scan(__va(dtb))) |
| 153 | return; | ||
| 154 | |||
| 155 | pr_err("No DTB passed to the kernel\n"); | ||
| 156 | #ifdef CONFIG_CMDLINE_FORCE | ||
| 157 | strlcpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); | ||
| 158 | pr_info("Forcing kernel command line to: %s\n", boot_command_line); | ||
| 159 | #endif | ||
| 153 | } | 160 | } |
| 154 | 161 | ||
| 155 | static void __init setup_bootmem(void) | 162 | static void __init setup_bootmem(void) |
| @@ -174,7 +181,7 @@ static void __init setup_bootmem(void) | |||
| 174 | BUG_ON(mem_size == 0); | 181 | BUG_ON(mem_size == 0); |
| 175 | 182 | ||
| 176 | set_max_mapnr(PFN_DOWN(mem_size)); | 183 | set_max_mapnr(PFN_DOWN(mem_size)); |
| 177 | max_low_pfn = memblock_end_of_DRAM(); | 184 | max_low_pfn = PFN_DOWN(memblock_end_of_DRAM()); |
| 178 | 185 | ||
| 179 | #ifdef CONFIG_BLK_DEV_INITRD | 186 | #ifdef CONFIG_BLK_DEV_INITRD |
| 180 | setup_initrd(); | 187 | setup_initrd(); |
