From nobody Sat Oct 4 20:59:06 2025 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 B94C4277009; Tue, 12 Aug 2025 12:57:16 +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=1755003436; cv=none; b=IBa2T+YeBtFlx7wvO3dBh2BtpSlykt8rOQ/wCLqVMxTupTlJbQc9DMUIHk1yKeam/N3FPJTjtOgIVgvrH1Pc8xqLpWhSm3wHaAtg/O7XD613R+6eX3qSBtmHYQhaeb9Mq5rHlzq90CqKZqyn6ooPO8igmNmuqKJ9Kad1ta8H4DY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755003436; c=relaxed/simple; bh=aaXUK4iUjo0o36xAlS2K6590asc4FE0myOp8eDO8tVE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=SeEWF19u+gqJ4GqbDQ1Yl+HyJ62OB/PewjUrrE7umagQ4Wk5+BFhvxO1MgU5eKbYKmzcrQzLm2YvBALhd+U+XboSa8hZ2Wdw9bdnyhtUMKZgQFXiO36V8YDlwEn79X6R3SLu77el7v1jGFCgTld8BEtKfcRdN0xvkkG627q7DOo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CqOjisd/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CqOjisd/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0CECC4CEF0; Tue, 12 Aug 2025 12:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755003436; bh=aaXUK4iUjo0o36xAlS2K6590asc4FE0myOp8eDO8tVE=; h=From:To:Cc:Subject:Date:From; b=CqOjisd/OnDMEhnSDOpVbXb66W3Mf/QqkZSbqKMlPuT3BShvsHJx+60WFb+hj0q/w 3bFvYVhmLeUIAs6vWIHrkiVLMVUqdciK6b+UnfWR5SGCdJ+NGCfSYdzAgtYgrHkYzR PKCXi88yz7Yrce1iUES0a8ziozIrhfxNA0IE4d1zWg6OyKX9gxgwKU8zvjGndFtRcD o/23/lvD5NawDKbe2MFxNz+qfpJ+/PFEp3SJfpLz3gNKvGVl1JegKzGwGlW8+nL7Gl eQntFWRCfwRU/69Rc7USB92hdfNcK6vgedjJEoTDRltMKM7QYJuzOghAjXL+P1ukYN CKiN/6i3UT4JA== From: "Rafael J. Wysocki" To: Linux ACPI Cc: Jiayi Li , LKML , Linux PM , Mario Limonciello Subject: [PATCH v1] ACPI: processor: perflib: Move problematic pr->performance check Date: Tue, 12 Aug 2025 14:57:06 +0200 Message-ID: <2801421.mvXUDI8C0e@rafael.j.wysocki> Organization: Linux Kernel Development 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 Content-Type: text/plain; charset="utf-8" From: Rafael J. Wysocki 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 appl= ication") Tested-by: Rafael J. Wysocki Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki --- 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 @@ -180,7 +180,7 @@ struct acpi_processor *pr =3D per_cpu(processors, cpu); int ret; =20 - if (!pr || !pr->performance) + if (!pr) continue; =20 /* @@ -197,6 +197,9 @@ pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu, ret); =20 + if (!pr->performance) + continue; + ret =3D acpi_processor_get_platform_limit(pr); if (ret) pr_err("Failed to update freq constraint for CPU%d (%d)\n",