From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sg-1-40.ptr.blmpb.com (sg-1-40.ptr.blmpb.com [118.26.132.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED72833C530 for ; Thu, 22 Jan 2026 07:36:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=118.26.132.40 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769067416; cv=none; b=NADfonI/jk8ZVs7/7LF40h1Tj5v6iTXlLwBtXr0Feu2/jxonQZgxjX7Lx37dd0ITVDZ5v4+l2SxvzwW+3DdgSADegZ3LKBwKoENDkvOOwTH7Cvk9877+Ir7S09Lzuo9qJBolL9FuS/x75SqK3UynLgKXJ+hOnk0HqUjyDR96EAQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769067416; c=relaxed/simple; bh=ShsQ3XBv7vrfIszF1XeNH9xjI9L7Tvs722lbbOYnkHU=; h=To:Date:Cc:Mime-Version:From:Subject:Message-Id:Content-Type; b=Jv3+gxtcSzGxVItY0X6331yOMJjNnuZGti7hTfi57H2hyG/6qLwxxpeWqAz2OHkqY66MDLbpzLKd5Y8WOY6CNpaPN7GvTBcXOHWURmQRF/PNAxgyTNVTUWKvQ9Rj8FMfSRjgrHydqv1ec1J5VyoIF61wyUv+GP3CP4jJ+b0u3Oo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=picoheart.com; spf=pass smtp.mailfrom=picoheart.com; dkim=pass (2048-bit key) header.d=picoheart-com.20200927.dkim.feishu.cn header.i=@picoheart-com.20200927.dkim.feishu.cn header.b=yPkUDbBQ; arc=none smtp.client-ip=118.26.132.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=picoheart.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=picoheart.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=picoheart-com.20200927.dkim.feishu.cn header.i=@picoheart-com.20200927.dkim.feishu.cn header.b="yPkUDbBQ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=s1; d=picoheart-com.20200927.dkim.feishu.cn; t=1769067292; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=4/OBCIJE/VhfTNxo9r56MT8A/UZqxjI8m594zPId+d8=; b=yPkUDbBQmg4A5gG4g1Of+/pcuhKu2t2xyKH8lNWoVZ/A+Au/1y9PRwTShSejjxOc9pplcN FX+sPlvEBQs6vig+93B4mv04gXRo5TWm7dBX0cKGmyi5mJ+IqMlbEUA00Jxne+DrEDMPLu L4PvRfcJf2L8x0olq0XxKASVV5qJ+35H29hs/+hl04GBY2IgOfXkv026T6XcwgqvNnuXM1 t/jugebA4yIF6PSlZYwU7DySJIYYNklVYKfkCmfUBcs0cEd1hISacz5cBcy4yCW+EBszKc szYgHVybpemNu1FunMucN3wQTvhNg6V9pmnGrnSy32FV4aGNiktDGef+xHVVbw== To: , , , , Date: Thu, 22 Jan 2026 15:34:44 +0800 X-Original-From: Yicong Yang Cc: , , , , , , , , , , , Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Yicong Yang" Subject: [PATCH 0/2] Ensure some device initialization before init task Received: from G9WYR9K0VW ([58.250.122.114]) by smtp.feishu.cn with ESMTPS; Thu, 22 Jan 2026 15:34:49 +0800 X-Mailer: git-send-email 2.50.1 X-Lms-Return-Path: Message-Id: <20260122073446.45628-1-yang.yicong@picoheart.com> Content-Type: text/plain; charset=UTF-8 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