From 3588cb8f72a4ea39417dc2b0d7a1807d442f43e5 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Mon, 5 Aug 2019 05:52:04 +0000 Subject: [PATCH] cpufreq: Kill userspace CPU boosting entirely Kernel-based CPU boosting is used now, so stop userspace from messing with it by turning scaling_min_freq into a no-op. Note that this is done instead of making scaling_min_freq read-only so that userspace doesn't spit out error messages when it can't do its boosting. Signed-off-by: Sultan Alsawaf Signed-off-by: Danny Lin Signed-off-by: UtsavBalar1231 --- drivers/cpufreq/cpufreq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index a9c484519369..db33268b47fa 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -727,6 +727,9 @@ static ssize_t store_##file_name \ int ret, temp; \ struct cpufreq_policy new_policy; \ \ + if (&policy->object == &policy->min) \ + return count; \ + \ memcpy(&new_policy, policy, sizeof(*policy)); \ new_policy.min = policy->user_policy.min; \ new_policy.max = policy->user_policy.max; \