From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8B5703D7D3C; Thu, 15 Jan 2026 17:50:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768499402; cv=none; b=SppILCBZBYjfEH9K1xjqL/1T2ER4CY3s00wDUIBBV73SCFci/CdCpB5v2qy8chIZaYXF2PiPEX4jXX4aeVuWMhP1zsQbbYfAHue3j8t5T+9JDoGavqW9NHLkfOpW3lfUMw2oGR+qRInmEZJzR7iLE/Mtbj/hNqPfZL2rMqtRbzE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768499402; c=relaxed/simple; bh=TSPG6ONsrqv447c0B/iTZ0snGS+grqm7A9kKazQzxFA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aLD79p4EG97MYsUQLcOxrKvssqH66heSt0yxxvT8ngJfXIgN4uQS1wUskL0BWdmrT5b/ejojX82SuBQZAq2KHTE70bA6s1JIVW2v52ZpLwBOk5qc+tatySni0xJl5aVn44L8N99+28eA1ubvlOIjNyntUaypaa2lKTYge4gklls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=r12TsqfL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="r12TsqfL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D271C116D0; Thu, 15 Jan 2026 17:50:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1768499402; bh=TSPG6ONsrqv447c0B/iTZ0snGS+grqm7A9kKazQzxFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r12TsqfLeB41lytqYMIoJ1IZ5nOu4os8fRWlO4kqtefNTRcXzWzfh7PRF+HPGgwWd Elhmh+5tBGtp3UQKUbHGCFy/donlvBG81CBGUhbrEFDLeWZfZjGRP/9dCZJF1wkHa0 77pn49sfs8udgaNaj8YoIBJzOQAq8OBs2NqHjtGk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Pengjie Zhang , "Rafael J. Wysocki" Subject: [PATCH 5.10 197/451] ACPI: CPPC: Fix missing PCC check for guaranteed_perf Date: Thu, 15 Jan 2026 17:46:38 +0100 Message-ID: <20260115164238.027633960@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260115164230.864985076@linuxfoundation.org> References: <20260115164230.864985076@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pengjie Zhang commit 6ea3a44cef28add2d93b1ef119d84886cb1e3c9b upstream. The current implementation overlooks the 'guaranteed_perf' register in this check. If the Guaranteed Performance register is located in the PCC subspace, the function currently attempts to read it without acquiring the lock and without sending the CMD_READ doorbell to the firmware. This can result in reading stale data. Fixes: 29523f095397 ("ACPI / CPPC: Add support for guaranteed performance") Signed-off-by: Pengjie Zhang Cc: 4.20+ # 4.20+ [ rjw: Subject and changelog edits ] Link: https://patch.msgid.link/20251210132227.1988380-1-zhangpengjie2@huawei.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/cppc_acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -1097,7 +1097,8 @@ int cppc_get_perf_caps(int cpunum, struc /* Are any of the regs PCC ?*/ if (CPC_IN_PCC(highest_reg) || CPC_IN_PCC(lowest_reg) || CPC_IN_PCC(lowest_non_linear_reg) || CPC_IN_PCC(nominal_reg) || - CPC_IN_PCC(low_freq_reg) || CPC_IN_PCC(nom_freq_reg)) { + CPC_IN_PCC(low_freq_reg) || CPC_IN_PCC(nom_freq_reg) || + CPC_IN_PCC(guaranteed_reg)) { if (pcc_ss_id < 0) { pr_debug("Invalid pcc_ss_id\n"); return -ENODEV;