Skip to content

Commit 69a8b62

Browse files
RevySRPaul Walmsley
authored andcommitted
riscv: acpi: avoid errors caused by probing DT devices when ACPI is used
Similar to the ARM64 commit 3505f30fb6a9s ("ARM64 / ACPI: If we chose to boot from acpi then disable FDT"), let's not do DT hardware probing if ACPI is enabled in early boot. This avoids errors caused by repeated driver probing. Signed-off-by: Han Gao <[email protected]> Link: https://lore.kernel.org/r/[email protected] [[email protected]: cleaned up patch description and subject] Signed-off-by: Paul Walmsley <[email protected]>
1 parent 9e68bd8 commit 69a8b62

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

arch/riscv/kernel/setup.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,14 @@ void __init setup_arch(char **cmdline_p)
331331
/* Parse the ACPI tables for possible boot-time configuration */
332332
acpi_boot_table_init();
333333

334+
if (acpi_disabled) {
334335
#if IS_ENABLED(CONFIG_BUILTIN_DTB)
335-
unflatten_and_copy_device_tree();
336+
unflatten_and_copy_device_tree();
336337
#else
337-
unflatten_device_tree();
338+
unflatten_device_tree();
338339
#endif
340+
}
341+
339342
misc_mem_init();
340343

341344
init_resources();

0 commit comments

Comments
 (0)