From patchwork Sun Feb 4 14:09:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5ZOy?= X-Patchwork-Id: 770004 Received: from m15.mail.163.com (m15.mail.163.com [45.254.50.219]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94A7B21340; Sun, 4 Feb 2024 14:10:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.50.219 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707055829; cv=none; b=RKyUOENnXLhFNyTwJplPk/MR9huiVRapEWuUIjdAcdaQrkRr/SnQZD+2kiCBYHHwk+5eTc51IhPmQN3S/ktdzihBEJ1FOER3JmeIHmtNRvU8LK7l42fVZdw3dt2aKIZb/+6whnQGwcUEaOfJOgWBlpVlkYLhHIkpQfIzTwMz0Cw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707055829; c=relaxed/simple; bh=cQod2kec5dLebpdvuIBrZKKCbKGaPXzQDdYDSwb8Ggg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=bYyLslrl1CVzA8//WVqg5COwiNQXz7B1r0jEscrQzYwSLfHvbTXy/ZnPYA5NNjh3tsHxsgseUhisPl05qCEiUxWTLGWO46MCf6p2XNM8K462eEt6oHyIdswsDZ6DNNqKDQZC6/4+sTas8BzEoVR75igs34m63rnkNvpga8dTGj8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=poT+QR7r; arc=none smtp.client-ip=45.254.50.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="poT+QR7r" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=8jCHz QVqZeuBi19Um8vqUH+qUXm7myMsYA/bMP+Z8II=; b=poT+QR7rrL8PzvufQ57Jo Z1PLk6Ax6iu4u70MQIVsqm+7VIJpx2S0uI9hvItJHXA+yIAb5zchYAGWbPSUJOcL O9VdVmi0xTfB6QvoVnDHU7o37yLbujcJEn1/D8D9OBIjw5kdo0DcUCMki9GBlmtl x8pu7c4ppuJy5JwMzE3/TA= Received: from localhost.localdomain (unknown [114.98.57.142]) by gzga-smtp-mta-g0-3 (Coremail) with SMTP id _____wDHLymgmr9lRyxOBg--.39710S4; Sun, 04 Feb 2024 22:09:55 +0800 (CST) From: Lizhe To: vincent.guittot@linaro.org, ilpo.jarvinen@linux.intel.com, rafael@kernel.org, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Lizhe Subject: [PATCH] cpufreq/schedutil: When updating limitations, frequency modulation interval not become invalid. Date: Sun, 4 Feb 2024 06:09:28 -0800 Message-Id: <20240204140928.2865-1-sensor1010@163.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: _____wDHLymgmr9lRyxOBg--.39710S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7XrWrAr1rXFWfXr18AF1rtFb_yoWfGFg_Cr 1fWwsrXr45Aw1DKF1fuF4Fyr9Iv3W3WF1vvry0q39xt34UAryFyry8Jr18AFWfW340kF9r AryqgF15Cr4UGjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRWlkxJUUUUU== X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/xtbBXhZ6q2VOBWhgYAAAsf If the current frequency scaling policy is schedutil. echo schedutil > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor This would result in an invalid frequency modulation interval. In sugov_limit(), sg_policy->limits_changed is set to true. Signed-off-by: Lizhe --- drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 44db4f59c4cc..a0af38fcb7e2 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2631,7 +2631,7 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy, if (new_gov == policy->governor) { pr_debug("governor limits update\n"); - cpufreq_governor_limits(policy); + cpufreq_policy_apply_limits(policy); return 0; }