Merge back earlier cpufreq material for v4.10.
[muen/linux.git] / drivers / cpufreq / intel_pstate.c
index 4737520ec8230a830d80e81c0dbc9dbaa96d0dc7..d7a9195a835138ad18f2cdce1e75af5dbbd91073 100644 (file)
@@ -235,7 +235,6 @@ static struct cpudata **all_cpu_data;
  * @p_gain_pct:                PID proportional gain
  * @i_gain_pct:                PID integral gain
  * @d_gain_pct:                PID derivative gain
- * @boost_iowait:      Whether or not to use iowait boosting.
  *
  * Stores per CPU model static PID configuration data.
  */
@@ -247,7 +246,6 @@ struct pstate_adjust_policy {
        int p_gain_pct;
        int d_gain_pct;
        int i_gain_pct;
-       bool boost_iowait;
 };
 
 /**
@@ -640,8 +638,10 @@ static void __init intel_pstate_debug_expose_params(void)
        struct dentry *debugfs_parent;
        int i = 0;
 
-       if (hwp_active)
+       if (hwp_active ||
+           pstate_funcs.get_target_pstate == get_target_pstate_use_cpu_load)
                return;
+
        debugfs_parent = debugfs_create_dir("pstate_snb", NULL);
        if (IS_ERR_OR_NULL(debugfs_parent))
                return;
@@ -1045,7 +1045,6 @@ static const struct cpu_defaults silvermont_params = {
                .p_gain_pct = 14,
                .d_gain_pct = 0,
                .i_gain_pct = 4,
-               .boost_iowait = true,
        },
        .funcs = {
                .get_max = atom_get_max_pstate,
@@ -1067,7 +1066,6 @@ static const struct cpu_defaults airmont_params = {
                .p_gain_pct = 14,
                .d_gain_pct = 0,
                .i_gain_pct = 4,
-               .boost_iowait = true,
        },
        .funcs = {
                .get_max = atom_get_max_pstate,
@@ -1109,7 +1107,6 @@ static const struct cpu_defaults bxt_params = {
                .p_gain_pct = 14,
                .d_gain_pct = 0,
                .i_gain_pct = 4,
-               .boost_iowait = true,
        },
        .funcs = {
                .get_max = core_get_max_pstate,
@@ -1362,7 +1359,7 @@ static void intel_pstate_update_util(struct update_util_data *data, u64 time,
        struct cpudata *cpu = container_of(data, struct cpudata, update_util);
        u64 delta_ns;
 
-       if (pid_params.boost_iowait) {
+       if (pstate_funcs.get_target_pstate == get_target_pstate_use_cpu_load) {
                if (flags & SCHED_CPUFREQ_IOWAIT) {
                        cpu->iowait_boost = int_tofp(1);
                } else if (cpu->iowait_boost) {