mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yicong Yang" <yang.yicong@picoheart.com>
To: <rafael@kernel.org>, <lenb@kernel.org>, <tglx@kernel.org>,
	 <gregkh@linuxfoundation.org>, <dakr@kernel.org>
Cc: <akpm@linux-foundation.org>, <apatel@ventanamicro.com>,
	<pjw@kernel.org>,  <palmer@dabbelt.com>, <aou@eecs.berkeley.edu>,
	<alex@ghiti.fr>,  <geshijian@picoheart.com>,
	<weidong.wd@picoheart.com>,  <yang.yicong@picoheart.com>,
	<linux-acpi@vger.kernel.org>,  <linux-kernel@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>
Subject: [PATCH 0/2] Ensure some device initialization before init task
Date: Thu, 22 Jan 2026 15:34:44 +0800	[thread overview]
Message-ID: <20260122073446.45628-1-yang.yicong@picoheart.com> (raw)

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

             reply	other threads:[~2026-01-22  7:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-22  7:34 Yicong Yang [this message]
2026-01-22  7:34 ` [PATCH 1/2] ACPI: scan: Use async schedule function for acpi_scan_clear_dep_fn Yicong Yang
2026-01-22 10:29   ` Greg KH
2026-01-22 12:43     ` Yicong Yang
2026-01-22 13:21       ` Rafael J. Wysocki
2026-01-22 13:48         ` Yicong Yang
2026-01-22 13:57           ` Rafael J. Wysocki
2026-01-22 16:27             ` Yicong Yang
2026-01-22 11:19   ` Rafael J. Wysocki
2026-01-22 12:50     ` Yicong Yang
2026-01-22 13:22       ` Rafael J. Wysocki
2026-01-22  7:34 ` [PATCH 2/2] init: Move console_on_rootfs after async_synchronize_full Yicong Yang
2026-01-22 10:27   ` Greg KH
2026-01-22 13:12     ` Yicong Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260122073446.45628-1-yang.yicong@picoheart.com \
    --to=yang.yicong@picoheart.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=apatel@ventanamicro.com \
    --cc=dakr@kernel.org \
    --cc=geshijian@picoheart.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=rafael@kernel.org \
    --cc=tglx@kernel.org \
    --cc=weidong.wd@picoheart.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®