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 4BB31335BA7; Mon, 18 Aug 2025 13:50:05 +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=1755525005; cv=none; b=kTNiJBfX95Z6mLwlh76x5otsu4awXSls9uDVhe8rLw42QeoOmUbIXIfqmt3w6oip2jUr7yOYegIv4KaMSKzMoGFIhjc9eTN0gK/tZiPQXUfrg/9eYhd04e8Oj58Swjyb2dZZMNa+T/6yRhH9cYVJOrmv0E4R/R0ZK2VfjiP35a8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755525005; c=relaxed/simple; bh=xU3FRGuxHMvwzQNA4mgMP1dyc3ZX7cxP2X+pi86x834=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Zc702vYUFcKIitcVuKQIpHfAMszJ+S+7NNW+YcqIzUrEcOm6Zx/wHOXb4q4mm8fWKCiwyfvqehpzn2/L4RXLdRyrouHQPl0hpv6iPDaLEnV6E+HdG6Zjoua/k+l9TrFySrqAVh9Q2tikT3IHhJQ7hr3X1lYTCIx3SOfW5q4fUsk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=X24IcC0B; 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="X24IcC0B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE1BBC4CEEB; Mon, 18 Aug 2025 13:50:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755525005; bh=xU3FRGuxHMvwzQNA4mgMP1dyc3ZX7cxP2X+pi86x834=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X24IcC0B+fObwHVNjA/+H5L6XN46EX0EEzx+pq1SszrsWNk5wtB8kfdCHrQKqBijv DwihAiB4LDOcm2lFMOHP5dTUOCfqgJ33aY+1WK9KD9aSm2Vo2iCEZcgHlrjK8hmFAC Fo7mAOaZUxU9MjkvNwKKnuYIoAZe8mJrpb9v90zM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Rafael J. Wysocki" , Prashant Malani , Viresh Kumar , Sasha Levin Subject: [PATCH 6.16 128/570] cpufreq: CPPC: Mark driver with NEED_UPDATE_LIMITS flag Date: Mon, 18 Aug 2025 14:41:55 +0200 Message-ID: <20250818124510.754946082@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250818124505.781598737@linuxfoundation.org> References: <20250818124505.781598737@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 6.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Prashant Malani [ Upstream commit 0a1416a49e63c320f6e6c1c8d07e1b58c0d4a3f3 ] AMU counters on certain CPPC-based platforms tend to yield inaccurate delivered performance measurements on systems that are idle/mostly idle. This results in an inaccurate frequency being stored by cpufreq in its policy structure when the CPU is brought online. [1] Consequently, if the userspace governor tries to set the frequency to a new value, there is a possibility that it would be the erroneous value stored earlier. In such a scenario, cpufreq would assume that the requested frequency has already been set and return early, resulting in the correct/new frequency request never making it to the hardware. Since the operating frequency is liable to this sort of inconsistency, mark the CPPC driver with CPUFREQ_NEED_UPDATE_LIMITS so that it is always invoked when a target frequency update is requested. Link: https://lore.kernel.org/linux-pm/20250619000925.415528-3-pmalani@google.com/ [1] Suggested-by: Rafael J. Wysocki Signed-off-by: Prashant Malani Acked-by: Viresh Kumar Link: https://patch.msgid.link/20250722055611.130574-2-pmalani@google.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/cpufreq/cppc_cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index b7c688a5659c..c8e63c7aa9a3 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c @@ -925,7 +925,7 @@ static struct freq_attr *cppc_cpufreq_attr[] = { }; static struct cpufreq_driver cppc_cpufreq_driver = { - .flags = CPUFREQ_CONST_LOOPS, + .flags = CPUFREQ_CONST_LOOPS | CPUFREQ_NEED_UPDATE_LIMITS, .verify = cppc_verify_policy, .target = cppc_cpufreq_set_target, .get = cppc_cpufreq_get_rate, -- 2.39.5