Skip to content
This repository was archived by the owner on Aug 8, 2021. It is now read-only.

Commit d9d2fe5

Browse files
kerneltoastkdrag0n
authored andcommitted
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 <[email protected]> Signed-off-by: Danny Lin <[email protected]>
1 parent 0a5656b commit d9d2fe5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/cpufreq/cpufreq.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,9 @@ static ssize_t store_##file_name \
706706
int ret, temp; \
707707
struct cpufreq_policy new_policy; \
708708
\
709+
if (&policy->object == &policy->min) \
710+
return count; \
711+
\
709712
memcpy(&new_policy, policy, sizeof(*policy)); \
710713
new_policy.min = policy->user_policy.min; \
711714
new_policy.max = policy->user_policy.max; \

0 commit comments

Comments
 (0)