diff options
Diffstat (limited to 'arch/riscv/kernel/setup.c')
| -rw-r--r-- | arch/riscv/kernel/setup.c | 23 | 
1 files changed, 18 insertions, 5 deletions
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index c7c0655dd45b..e85bacff1b50 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -216,8 +216,15 @@ static void __init init_resources(void)  static void __init parse_dtb(void)  {  	/* Early scan of device tree from init memory */ -	if (early_init_dt_scan(dtb_early_va)) +	if (early_init_dt_scan(dtb_early_va)) { +		const char *name = of_flat_dt_get_machine_name(); + +		if (name) { +			pr_info("Machine model: %s\n", name); +			dump_stack_set_arch_desc("%s (DT)", name); +		}  		return; +	}  	pr_err("No DTB passed to the kernel\n");  #ifdef CONFIG_CMDLINE_FORCE @@ -252,9 +259,9 @@ void __init setup_arch(char **cmdline_p)  	else  		pr_err("No DTB found in kernel mappings\n");  #endif +	misc_mem_init(); -	if (IS_ENABLED(CONFIG_RISCV_SBI)) -		sbi_init(); +	sbi_init();  	if (IS_ENABLED(CONFIG_STRICT_KERNEL_RWX))  		protect_kernel_text_data(); @@ -275,13 +282,19 @@ void __init setup_arch(char **cmdline_p)  static int __init topology_init(void)  { -	int i; +	int i, ret; + +	for_each_online_node(i) +		register_one_node(i);  	for_each_possible_cpu(i) {  		struct cpu *cpu = &per_cpu(cpu_devices, i);  		cpu->hotpluggable = cpu_has_hotplug(i); -		register_cpu(cpu, i); +		ret = register_cpu(cpu, i); +		if (unlikely(ret)) +			pr_warn("Warning: %s: register_cpu %d failed (%d)\n", +			       __func__, i, ret);  	}  	return 0;  | 
