diff options
author | Len Brown <len.brown@intel.com> | 2017-06-24 01:11:53 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-06-26 19:47:33 -0400 |
commit | 62611cb912f7cb08ef7815780bcc20a09abedd20 (patch) | |
tree | b9f72fdde04d5139610bb827f4b844b2705bba2b | |
parent | f8475cef90082bf0902ddab106112de130d90395 (diff) |
intel_pstate: delete scheduler hook in HWP mode
The cpufreq/scaling_cur_freq sysfs attribute is now provided by
shared x86 cpufreq code on modern x86 systems, including
all systems supported by the intel_pstate driver.
In HWP mode, maintaining that value was the sole purpose of
the scheduler hook, intel_pstate_update_util_hwp(),
so it can now be removed.
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index be0290a1a5e2..b00a45595c89 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -1736,16 +1736,6 @@ static void intel_pstate_adjust_pstate(struct cpudata *cpu, int target_pstate) | |||
1736 | fp_toint(cpu->iowait_boost * 100)); | 1736 | fp_toint(cpu->iowait_boost * 100)); |
1737 | } | 1737 | } |
1738 | 1738 | ||
1739 | static void intel_pstate_update_util_hwp(struct update_util_data *data, | ||
1740 | u64 time, unsigned int flags) | ||
1741 | { | ||
1742 | struct cpudata *cpu = container_of(data, struct cpudata, update_util); | ||
1743 | u64 delta_ns = time - cpu->sample.time; | ||
1744 | |||
1745 | if ((s64)delta_ns >= INTEL_PSTATE_HWP_SAMPLING_INTERVAL) | ||
1746 | intel_pstate_sample(cpu, time); | ||
1747 | } | ||
1748 | |||
1749 | static void intel_pstate_update_util_pid(struct update_util_data *data, | 1739 | static void intel_pstate_update_util_pid(struct update_util_data *data, |
1750 | u64 time, unsigned int flags) | 1740 | u64 time, unsigned int flags) |
1751 | { | 1741 | { |
@@ -1937,6 +1927,9 @@ static void intel_pstate_set_update_util_hook(unsigned int cpu_num) | |||
1937 | { | 1927 | { |
1938 | struct cpudata *cpu = all_cpu_data[cpu_num]; | 1928 | struct cpudata *cpu = all_cpu_data[cpu_num]; |
1939 | 1929 | ||
1930 | if (hwp_active) | ||
1931 | return; | ||
1932 | |||
1940 | if (cpu->update_util_set) | 1933 | if (cpu->update_util_set) |
1941 | return; | 1934 | return; |
1942 | 1935 | ||
@@ -2570,7 +2563,6 @@ static int __init intel_pstate_init(void) | |||
2570 | } else { | 2563 | } else { |
2571 | hwp_active++; | 2564 | hwp_active++; |
2572 | intel_pstate.attr = hwp_cpufreq_attrs; | 2565 | intel_pstate.attr = hwp_cpufreq_attrs; |
2573 | pstate_funcs.update_util = intel_pstate_update_util_hwp; | ||
2574 | goto hwp_cpu_matched; | 2566 | goto hwp_cpu_matched; |
2575 | } | 2567 | } |
2576 | } else { | 2568 | } else { |