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 8737334AAFE; Tue, 26 Aug 2025 14:14:39 +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=1756217679; cv=none; b=RWmX6J/yroSgmmKeMqaBv0gB3NEuV2gSxCT9jpKsLKVc//wz42X+UZCe2n09lPKhUJYRNSC/M1/S1t1XWs3AHhoBpuQo6PmlNocafjdbAaaIgm+9TxlhkgL5BzSoWbASH5jo+NfCSjzbDTzr0Vd/BNmKU8Z9kPEcGDq114anl1Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756217679; c=relaxed/simple; bh=mYWI1Jhiz+cBa4SwuOTRJDsKqlxk4a4RIUviKcxTevA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FE5L+SN+Cbuy2Wk2n3sYicGBzc9RWLu2w31ioQw4zDlD/aNHgF0fGW4HWsxYlLh8FTF9TXNE6Kb1XlZ4UBR04nV3wrbTBiFGC4+rL55KjX3SefyIfgzXd+qIChSzBv5sELIQ9yma56xy6+hGCBosBniNEFLH1PvP1OZejn+s8gc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ECmXassO; 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="ECmXassO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 178DDC113CF; Tue, 26 Aug 2025 14:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756217679; bh=mYWI1Jhiz+cBa4SwuOTRJDsKqlxk4a4RIUviKcxTevA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ECmXassOzhSGcvK6rQUJTxTZGpTf7LDdLop8uqkJEcEnfPHiD84z1mkhCQ2pLvxhX nzh1QcUM3kH02WuKZDxSP13LmMoq/Pr62lixLjSdz05G8e5cGNv248pmb7NLnCKJDn sIhF+/OK/aKxLkM4OAsf6mZAc1nFwzFu5xzbzojA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Rafael J. Wysocki" Subject: [PATCH 5.10 204/523] ACPI: processor: perflib: Move problematic pr->performance check Date: Tue, 26 Aug 2025 13:06:54 +0200 Message-ID: <20250826110929.478161504@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110924.562212281@linuxfoundation.org> References: <20250826110924.562212281@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev 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: Rafael J. Wysocki commit d405ec23df13e6df599f5bd965a55d13420366b8 upstream. Commit d33bd88ac0eb ("ACPI: processor: perflib: Fix initial _PPC limit application") added a pr->performance check that prevents the frequency QoS request from being added when the given processor has no performance object. Unfortunately, this causes a WARN() in freq_qos_remove_request() to trigger on an attempt to take the given CPU offline later because the frequency QoS object has not been added for it due to the missing performance object. Address this by moving the pr->performance check before calling acpi_processor_get_platform_limit() so it only prevents a limit from being set for the CPU if the performance object is not present. This way, the frequency QoS request is added as it was before the above commit and it is present all the time along with the CPU's cpufreq policy regardless of whether or not the CPU is online. Fixes: d33bd88ac0eb ("ACPI: processor: perflib: Fix initial _PPC limit application") Tested-by: Rafael J. Wysocki Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2801421.mvXUDI8C0e@rafael.j.wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/processor_perflib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -183,7 +183,7 @@ void acpi_processor_ppc_init(struct cpuf struct acpi_processor *pr = per_cpu(processors, cpu); int ret; - if (!pr || !pr->performance) + if (!pr) continue; /* @@ -200,6 +200,9 @@ void acpi_processor_ppc_init(struct cpuf pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu, ret); + if (!pr->performance) + continue; + ret = acpi_processor_get_platform_limit(pr); if (ret) pr_err("Failed to update freq constraint for CPU%d (%d)\n",