diff options
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 01f8f289b882..a5af890827eb 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -576,16 +576,6 @@ static inline void intel_pstate_busy_pid_reset(struct cpudata *cpu) | |||
576 | pid_reset(&cpu->pid, pid_params.setpoint, 100, pid_params.deadband, 0); | 576 | pid_reset(&cpu->pid, pid_params.setpoint, 100, pid_params.deadband, 0); |
577 | } | 577 | } |
578 | 578 | ||
579 | static inline void intel_pstate_reset_all_pid(void) | ||
580 | { | ||
581 | unsigned int cpu; | ||
582 | |||
583 | for_each_online_cpu(cpu) { | ||
584 | if (all_cpu_data[cpu]) | ||
585 | intel_pstate_busy_pid_reset(all_cpu_data[cpu]); | ||
586 | } | ||
587 | } | ||
588 | |||
589 | static inline void update_turbo_state(void) | 579 | static inline void update_turbo_state(void) |
590 | { | 580 | { |
591 | u64 misc_en; | 581 | u64 misc_en; |
@@ -941,9 +931,14 @@ static void intel_pstate_update_policies(void) | |||
941 | /************************** debugfs begin ************************/ | 931 | /************************** debugfs begin ************************/ |
942 | static int pid_param_set(void *data, u64 val) | 932 | static int pid_param_set(void *data, u64 val) |
943 | { | 933 | { |
934 | unsigned int cpu; | ||
935 | |||
944 | *(u32 *)data = val; | 936 | *(u32 *)data = val; |
945 | pid_params.sample_rate_ns = pid_params.sample_rate_ms * NSEC_PER_MSEC; | 937 | pid_params.sample_rate_ns = pid_params.sample_rate_ms * NSEC_PER_MSEC; |
946 | intel_pstate_reset_all_pid(); | 938 | for_each_possible_cpu(cpu) |
939 | if (all_cpu_data[cpu]) | ||
940 | intel_pstate_busy_pid_reset(all_cpu_data[cpu]); | ||
941 | |||
947 | return 0; | 942 | return 0; |
948 | } | 943 | } |
949 | 944 | ||