[PATCH 0/2] Ensure some device initialization before init task
Yicong Yang
yang.yicong at picoheart.com
Wed Jan 21 23:34:44 PST 2026
Fix two issues that may cause devices initialization finished
after entering init task.
Patch 1 ensure the device object scanning by acpi_scan_clear_dep_fn()
is finished before entering init task. Otherwise if some key devices
like console or root device are not ready when entering init task,
the system will panic (no available console) or enter rescure shell
(no root device). It's more possible on RISCV since these devices
are scan and created by acpi_scan_clear_dep_fn() and we've observed
this.
Patch 2 fix a theoretical issue that the console initialization is
still in process by the time we open the console. Since we call
console_on_rootfs() before async_synchronize_full(), there's no
guaranteed for the order.
Thanks Thomas for the discussion to debug these two issues [1].
[1] https://lore.kernel.org/linux-riscv/20260114063730.78009-1-yang.yicong@picoheart.com/
Yicong Yang (2):
ACPI: scan: Use async schedule function for acpi_scan_clear_dep_fn
init: Move console_on_rootfs after async_synchronize_full
drivers/acpi/scan.c | 35 ++++++++++++++++-------------------
init/main.c | 4 ++--
2 files changed, 18 insertions(+), 21 deletions(-)
--
2.34.1
More information about the linux-riscv
mailing list