From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380848; b=YL9zb3MFlBj+piejBdvVHLWYTX+2R1IHbtMsCi6pTmFfVqbUtDUqGfT71mtD2VYS/MWv AalXjY3zMIZO5R2hd56FhlEjmDuN0dah5A2ZZh26ZLuQ5gociGstYVPl9QWlOAJHotlOn YyWhxGM09VeNIpUPMqPzT9kcbOdnaC/Lm6ALfo4UnOEd8gIRPp760dCyhPQvC7iuZkTZI 0N/Zcg1k2jOL3y4OvKylBqmd3lE7vS5jbZZqADXfnyB7NrYoC5OgfmbMwl9aKOvHk8Ayq nraPl38ql1xRUlsO2RVD04TGu8C43ZKs769BQsu6P2rYOzLZF2WTiscoaYJClvTEncA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380848; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=7x8C9gymGvMclYaJ6k3roXE4lg0zlahBv7PTLIbandQ=; b=BWjJ6ebldrrxc9rPJRrNKlvc5MD47x+L2Da6asxymmfsmzaWokmmX8KtDumPNqdw2MZi N1UUaDpJJ+MHo9nXgt6lvjS9R5XrdYyFDvB1yB7i686M2IgG8eZy6k7R/kjreQLKXlIwr n0mM4Fpe1vuRukOg7yGMY5VW62oNdN6+IewLZMaouYmDtLYqMxyCM1n6Ex7ETB1fz+Y1I h+QaC1zmJuCFLYJsLvfNWOjkFOFmcKV8LYnb/3rNqAs98Oal1Je1rFTcqGsF5Ij63zhvt DnBuY5qakLiB9rgdDSgiyZk9Mc9L4hIgEw2akobbaS4+pceWtOLq4KSftItJBFHqHtg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=YrzHOttf; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38772606A322; Fri, 4 Dec 2026 10:40:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=YrzHOttf Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC37D1F000CE; Fri, 4 Dec 2026 10:40:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380848; bh=7x8C9gymGvMclYaJ6k3roXE4lg0zlahBv7PTLIbandQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=YrzHOttf4/77t1/CeRveFSPWdbAPPu+AhC6dJlcMRzboIJFqX6zrDchCR+WXR+hnP QbXTuYMSPRBm4ULFAk75X8Jkp9V47Zd3e0RFyxKwQqxv7WMQfwxvjnSuQ2XV3CQH1s AnlD2FyfmCjATudpBrJyLBBOCFaLzJNK4ddG4uTA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sumit Gupta , Christian Loehle , "Rafael J. Wysocki" Subject: [PATCH 7.3 451/742] cpufreq: CPPC: Set CPPC Enable register in cpu_init() Date: Fri, 4 Dec 2026 19:05:15 +0900 Message-ID: <20261204100647.143641474@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sumit Gupta commit 7cca01c39cc89f6ef39079484d26b6d99287a610 upstream. As per ACPI 6.x s8.4.6.1.4 (CPPC Enable Register): "If supported by the platform, OSPM writes a one to this register to enable CPPC on this processor. If not implemented, OSPM assumes the platform always has CPPC enabled." The driver never writes this register. CPPC therefore stays disabled on platforms such as NVIDIA GB10 that wait for OSPM to enable it. Call cppc_set_enable() in cppc_cpufreq_cpu_init(). Fail init if enabling CPPC fails. If init fails after CPPC is enabled, disable it again. The register is optional, so -EOPNOTSUPP is not an error. Fixes: 5477fb3bd1e8 ("ACPI / CPPC: Add a CPUFreq driver for use with CPPC") Cc: All applicable # ab482f1bac6b "ACPI: CPPC: Refactor register value get and set ABIs" Signed-off-by: Sumit Gupta Reviewed-by: Christian Loehle [ rjw: Subject tweak ] Link: https://patch.msgid.link/20261110101246.3665797-1-sumitg@nvidia.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/cpufreq/cppc_cpufreq.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c @@ -719,7 +719,17 @@ static int cppc_cpufreq_cpu_init(struct pr_debug("Unsupported CPU co-ord type: %d\n", policy->shared_type); ret = -EFAULT; - goto out; + goto out_put; + } + + /* + * Enable CPPC. The Enable register is optional - some platforms + * may not support it. + */ + ret = cppc_set_enable(cpu, true); + if (ret && ret != -EOPNOTSUPP) { + pr_err("Failed to enable CPPC for CPU%u (%d)\n", cpu, ret); + goto out_put; } policy->fast_switch_possible = cppc_allow_fast_switch(policy->cpus); @@ -747,6 +757,8 @@ static int cppc_cpufreq_cpu_init(struct return 0; out: + cppc_set_enable(cpu, false); +out_put: cppc_cpufreq_put_cpu_data(policy); return ret; }