From nobody Thu Oct 9 04:57:26 2025 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C795284662; Fri, 20 Jun 2025 13:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.15 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750425297; cv=pass; b=WSEAs/SACbBy8kTVVpEz2VPM0kSnNnTygx20SCCZ4Jp4u2dBjti1Ge49QTO7rIjfdrF8jGepqGPN48HQHfTepSbo/XsMiX8FfhRA3gLsUGgr66T6njyhZzWFbfMojWGonoGWLmU2y8Pb/QyGUQT7mNfjxoDqBPgPranMx8gwwdc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750425297; c=relaxed/simple; bh=JoqxZK5kKb3iGbF2HT2J3CanHyR4uWwtcC9OwzKn6kc=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=txTRXLCIlvfxTOStZZqxCshmU5QE15rbrk26JAdBAYXGwk13YXBaTHjBMj5CzAF8BXqcAbCWtDURq7Oc+SKi7wDilLh6qXvVmjw/rVg3rgAIMoB8FaCZ5ZXAvJTqnrKFeePM6TrwleyoLNMEz+b15pqbp+abRyClH68VKrKChcA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty; spf=pass smtp.mailfrom=linux.beauty; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b=UHG+C+w5; arc=pass smtp.client-ip=136.143.188.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.beauty Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b="UHG+C+w5" ARC-Seal: i=1; a=rsa-sha256; t=1750425208; cv=none; d=zohomail.com; s=zohoarc; b=MNHPccnBs+XXqy/H38CYDXt+t1su8buoNkN2GLnJ8NF2v6G5p0nuG1vsO8RTsKLekpEN7rZNa5trxFxAQtJT3OjRBJm6GlSLsqctO+WIVxIBvzKqQ+QsjFOPnL0YY4LyBj/eGU8hPQdnYdw17FKpX/UiJky6R06GOtijle5FtE0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1750425208; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=P6KhJbmkVl7HuIV2HXHuYKvcE/VNTXSLGZUIxgNMypM=; b=dcciD0HGu+lRgum+Jz0u5+lLYqFY7J9aZuIz2meefUVjEpWYo15ETJY3tyFKW19Fjtw60EUiGh607t7r/gMw6djQvez0GicvceRzprUCOXh+JbqPKPvXwJ2qCnsS+5VHYf01RMC6doPNEIJIa0bFKSRy0doEl9bSQiZpT/ZtLJk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=linux.beauty; spf=pass smtp.mailfrom=me@linux.beauty; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1750425208; s=zmail; d=linux.beauty; i=me@linux.beauty; h=From:From:To:To:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=P6KhJbmkVl7HuIV2HXHuYKvcE/VNTXSLGZUIxgNMypM=; b=UHG+C+w5Z4XSdDUJVC9HC7AjqBnOLQM2EiYpIDGXBLWk4SobNmSn+oBinQroOL53 /A7e0coeFgopow0/dHxl1Akf1dKGiyQOJcrkw8Jfb63haR/o6tLZceApq/W7RJKHIz4 vPEzqPZflBieXhzKF8RZAoVoa91hOKZhZZETC5vU= Received: by mx.zohomail.com with SMTPS id 17504252076891004.916800415434; Fri, 20 Jun 2025 06:13:27 -0700 (PDT) From: Li Chen To: Hanjun Guo , Catalin Marinas , Will Deacon , "Rafael J . Wysocki" , Len Brown , Liu Wei , Ryan Roberts , Andrew Morton , Jonathan Cameron , Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Anshuman Khandual , Li Chen Subject: [PATCH v2 2/2] ACPI: Suppress misleading SPCR console message when SPCR table is absent Date: Fri, 20 Jun 2025 21:13:08 +0800 Message-ID: <20250620131309.126555-3-me@linux.beauty> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250620131309.126555-1-me@linux.beauty> References: <20250620131309.126555-1-me@linux.beauty> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" From: Li Chen The kernel currently alway prints: "Use ACPI SPCR as default console: No/Yes " even on systems that lack an SPCR table. This can mislead users into thinking the SPCR table exists on the machines without SPCR. With this change, the "Yes" is only printed if the SPCR table is present, parsed and !param_acpi_nospcr. This avoids user confusion on SPCR-less systems. Signed-off-by: Li Chen --- changelog: v2: refine the printk message logic as suggested by Hanjun Guo. arch/arm64/kernel/acpi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index b9a66fc146c9f..4d529ff7ba513 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -197,6 +197,8 @@ static int __init acpi_fadt_sanity_check(void) */ void __init acpi_boot_table_init(void) { + int ret; + /* * Enable ACPI instead of device tree unless * - ACPI has been disabled explicitly (acpi=3Doff), or @@ -250,10 +252,12 @@ void __init acpi_boot_table_init(void) * behaviour, use acpi=3Dnospcr to disable console in ACPI SPCR * table as default serial console. */ - acpi_parse_spcr(earlycon_acpi_spcr_enable, + ret =3D acpi_parse_spcr(earlycon_acpi_spcr_enable, !param_acpi_nospcr); - pr_info("Use ACPI SPCR as default console: %s\n", - param_acpi_nospcr ? "No" : "Yes"); + if (!ret || param_acpi_nospcr || !IS_ENABLED(CONFIG_ACPI_SPCR_TABLE)) + pr_info("Use ACPI SPCR as default console: No\n"); + else + pr_info("Use ACPI SPCR as default console: Yes\n"); =20 if (IS_ENABLED(CONFIG_ACPI_BGRT)) acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); --=20 2.49.0