From nobody Wed Jul 15 07:31:46 2026 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 CBD64469D; Fri, 6 Jun 2025 07:29:23 +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=1749194965; cv=pass; b=ouBpd+4un5+6vOa+DU0iLoQiKBfTNaQJZXf5zAuW4ckbq41dzGNSKwvinHUeFyA1MN6lKRX0N9BJzcnJLkh4dOwEZZQJvf2ZKxmS1ncyHdEYrEyXNM2iiDgC0tTVyTTG1bA4uX5Fuk+WGyZee7uFt59E348lzaYOaZlvn1hQoxo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749194965; c=relaxed/simple; bh=H5R8o0kXd66u4+i/qXbUVwWj9FSg3AdZtj4azxMfffE=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aE5cQ9CTar8NA9CpAg8Lv1HDP9M0Gh3f+c1zlMIZpgMzQqccGGsqASPsVPYVV3JK+z21UhJW9rfipJFmCFUj4AGaBgZ0by2vInIqz/i5oB3+dynpFKUsnQsoes4Dwfj2hZ1ujxqgFRGXvdaPtUni7pMFCHeq9eNXckioa20BODA= 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=YUTj02IA; 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="YUTj02IA" ARC-Seal: i=1; a=rsa-sha256; t=1749194901; cv=none; d=zohomail.com; s=zohoarc; b=jT+1H/LxEAY3EbsWnqWj8dczRAs1f6ZSKFQIg/lwPFbyEkHO+Tun2f1+rh6qFF+e1TzzbN++r6JSY2izPRyTnlbKh2kp1eUsT6TgNH0/KNd25HBnxB4WBR7MNlGTbeyoRjqXlX8cUF3JORya7eIsUOPtAi2rWVY4uwiJC1XWo+I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749194901; 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=ih0cPhQO9yl9dR3mzLUlHo55Ox0dnBul4xmprtM+Rl4=; b=OLlGPuzdj5ulnL4RZklEU2WRqnPAVm+P/Pb9P1TXYIwaSD5M9EeShYHfjEy5wH7Ubr/cIX6+/oYnfcCO+wvzDg2CgNmQB+ghkvQcaN4v1ZJDrCHe4S3Ij4XDKrKjocH6D5Lp9YS9d76VjjAU8OKNDBZ3Wc7hfxBzgUkL9BzLajE= 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=1749194901; 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=ih0cPhQO9yl9dR3mzLUlHo55Ox0dnBul4xmprtM+Rl4=; b=YUTj02IAxGNPvp3Z1gRnhCzZoY4/mxo8Q7Ca7H1mnM6/mAg27xTxxgKRmkG0PRuE hfqW64lknvNHvEYq2PfSijGwikxu3KwZHV3NliLZSaD3I9CFdjmAYJJ6YwtcSfhqeQ3 CyNg4RV/AkAD6lBKf3wtjuNNwTB+6ERwzjtdKzg0= Received: by mx.zohomail.com with SMTPS id 174919490049757.462558800920874; Fri, 6 Jun 2025 00:28:20 -0700 (PDT) From: Li Chen To: Catalin Marinas , Will Deacon , "Rafael J. Wysocki" , Len Brown , Hanjun Guo , Liu Wei , Ryan Roberts , Andrew Morton , Jonathan Cameron , Li Chen , Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH 1/2] ACPI: Return -ENODEV from acpi_parse_spcr() when SPCR support is disabled Date: Fri, 6 Jun 2025 15:27:44 +0800 Message-ID: <20250606072802.191580-2-me@linux.beauty> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250606072802.191580-1-me@linux.beauty> References: <20250606072802.191580-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 If CONFIG_ACPI_SPCR_TABLE is disabled, acpi_parse_spcr() currently returns 0, which may incorrectly suggest that SPCR parsing was successful. This patch changes the behavior to return -ENODEV to clearly indicate that SPCR support is not available. This prepares the codebase for future changes that depend on acpi_parse_spcr() failure detection, such as suppressing misleading console messages. Signed-off-by: Li Chen --- include/linux/acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index f102c0fe34318..71e692f952905 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1503,7 +1503,7 @@ int acpi_parse_spcr(bool enable_earlycon, bool enable= _console); #else static inline int acpi_parse_spcr(bool enable_earlycon, bool enable_consol= e) { - return 0; + return -ENODEV; } #endif =20 --=20 2.49.0 From nobody Wed Jul 15 07:31:46 2026 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 91271276051; Fri, 6 Jun 2025 07:29:49 +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=1749194991; cv=pass; b=KnKB2pCYzdslNpHbg5gxW7lCbWPxbslXvUNI3EA+dryLDhA0EO+6TIW+P0FNVS6D5QH2qJ+EUu0/HTg4/DeNJxQox2lMb34MyAMaJbonoPfbRIg5EeJ6vfvNvHSlYxYh/awMeXg4CuqWM3jezGm7WCHsBJgM69d+1u76HUYGK1I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749194991; c=relaxed/simple; bh=PkE9IzA6eF7lcZSRpM8TLOhOBuPn8MAenMZuqetOh5Y=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ChSVvCreh4xytucyPm4JvpH0Rt10eAQOKLxQgr9d0AKV1EPTJaU1FVau/vJv1G1RJNANAvdvd5i5Bb7bvSue8eT4UFwXRnkW51YiPSfo2bulcOb/y2Pj4Lq5xyAH2W/HaADbDHpBiPDB8ICuJuhmPTpy9hGbyU2c8cvGSAqd4y4= 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=OP47TFlE; 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="OP47TFlE" ARC-Seal: i=1; a=rsa-sha256; t=1749194910; cv=none; d=zohomail.com; s=zohoarc; b=O4fbyuuLCZ/UNw4Bf88gAVG9Y3YRG4bWdKbmU5i+G+zEgvkGQQKh+8kMMEWxA3m6yb+caboaEa43RsHiIkVzl+KVqtzqfcTah5264Jv65tS/7Wft9dkxs/PAYyesKVPRxvD/nG8E+TML9ZV+poJ1UUl+PvNS3bCyCPbOuBmrL7c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749194910; 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=wGYCSzqgyscwX5RWcWecTBpY7TJ/S+OUK1ejoxldwXU=; b=Hs73Y7n2dALRul3MN3HwO09tjg8LoOjG3OTc19Ng3eix+uB1hn12afCjNmS/oQE0Qt9ZdsYZLk+5BKiYCDAN47VELlBXptsP/vPAf9nsz/NLJ32ri8kQfdLgPK4H/8Dx6fdRCCmBm9JnXmUW1Oke0yYs0w+mWsWKGc5ZbzMK9Fs= 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=1749194909; 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=wGYCSzqgyscwX5RWcWecTBpY7TJ/S+OUK1ejoxldwXU=; b=OP47TFlEAXWTY1X4cNQ/pA4d2f/CH0AOSaRTAq8GBT4woSe57CoswFvcr8KisNVt 3DTkNbroEYYq1x2SkM9hJhB87Nm9rS6o7pD0uHF253ZnD3+07D0ixoN1PRpFVNEgjgm OapyMhcJFNx1QyOSIaQmLM9cKXcepJ/F7rGqrBdQ= Received: by mx.zohomail.com with SMTPS id 1749194907959941.1326295181373; Fri, 6 Jun 2025 00:28:27 -0700 (PDT) From: Li Chen To: Catalin Marinas , Will Deacon , "Rafael J. Wysocki" , Len Brown , Hanjun Guo , Liu Wei , Ryan Roberts , Andrew Morton , Jonathan Cameron , Li Chen , Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH 2/2] ACPI: Suppress misleading SPCR console message when SPCR table is absent Date: Fri, 6 Jun 2025 15:27:45 +0800 Message-ID: <20250606072802.191580-3-me@linux.beauty> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250606072802.191580-1-me@linux.beauty> References: <20250606072802.191580-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 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 message is only printed if acpi_parse_spcr() succeeds (i.e., if the SPCR table is present and parsed). This avoids user confusion on SPCR-less systems. Signed-off-by: Li Chen --- arch/arm64/kernel/acpi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index b9a66fc146c9f..bf29e7b668f1d 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,11 @@ 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) + pr_info("Use ACPI SPCR as default console: %s\n", + param_acpi_nospcr ? "No" : "Yes"); =20 if (IS_ENABLED(CONFIG_ACPI_BGRT)) acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); --=20 2.49.0