|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/cpufreq-nforce2.c linux-3.10.0-229.el7/drivers/cpufreq/cpufreq-nforce2.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/cpufreq-nforce2.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/cpufreq-nforce2.c 2015-03-09 09:22:18.376023945 -0400
|
|
|
a8a466 |
@@ -270,7 +270,7 @@
|
|
|
a8a466 |
pr_debug("Old CPU frequency %d kHz, new %d kHz\n",
|
|
|
a8a466 |
freqs.old, freqs.new);
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_begin(policy, &freqs);
|
|
|
a8a466 |
|
|
|
a8a466 |
/* Disable IRQs */
|
|
|
a8a466 |
/* local_irq_save(flags); */
|
|
|
a8a466 |
@@ -285,7 +285,7 @@
|
|
|
a8a466 |
/* Enable IRQs */
|
|
|
a8a466 |
/* local_irq_restore(flags); */
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_end(policy, &freqs, 0);
|
|
|
a8a466 |
|
|
|
a8a466 |
return 0;
|
|
|
a8a466 |
}
|
|
|
a8a466 |
Binary files linux-3.10.0-229.el7.original/drivers/cpufreq/.cpufreq-nforce2.c.swp and linux-3.10.0-229.el7/drivers/cpufreq/.cpufreq-nforce2.c.swp differ
|
|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/exynos5440-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/exynos5440-cpufreq.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/exynos5440-cpufreq.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/exynos5440-cpufreq.c 2015-03-09 09:22:18.377023945 -0400
|
|
|
a8a466 |
@@ -238,7 +238,7 @@
|
|
|
a8a466 |
freqs.old = dvfs_info->cur_frequency;
|
|
|
a8a466 |
freqs.new = freq_table[index].frequency;
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_begin(policy, &freqs);
|
|
|
a8a466 |
|
|
|
a8a466 |
/* Set the target frequency in all C0_3_PSTATE register */
|
|
|
a8a466 |
for_each_cpu(i, policy->cpus) {
|
|
|
a8a466 |
@@ -279,7 +279,7 @@
|
|
|
a8a466 |
dev_crit(dvfs_info->dev, "New frequency out of range\n");
|
|
|
a8a466 |
freqs.new = dvfs_info->cur_frequency;
|
|
|
a8a466 |
}
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_end(policy, &freqs, 0);
|
|
|
a8a466 |
|
|
|
a8a466 |
cpufreq_cpu_put(policy);
|
|
|
a8a466 |
mutex_unlock(&cpufreq_lock);
|
|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/gx-suspmod.c linux-3.10.0-229.el7/drivers/cpufreq/gx-suspmod.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/gx-suspmod.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/gx-suspmod.c 2015-03-09 09:22:18.377023945 -0400
|
|
|
a8a466 |
@@ -265,7 +265,7 @@
|
|
|
a8a466 |
|
|
|
a8a466 |
freqs.new = new_khz;
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_begin(policy, &freqs);
|
|
|
a8a466 |
local_irq_save(flags);
|
|
|
a8a466 |
|
|
|
a8a466 |
if (new_khz != stock_freq) {
|
|
|
a8a466 |
@@ -314,7 +314,7 @@
|
|
|
a8a466 |
|
|
|
a8a466 |
gx_params->pci_suscfg = suscfg;
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_end(policy, &freqs, 0);
|
|
|
a8a466 |
|
|
|
a8a466 |
pr_debug("suspend modulation w/ duration of ON:%d us, OFF:%d us\n",
|
|
|
a8a466 |
gx_params->on_duration * 32, gx_params->off_duration * 32);
|
|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/integrator-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/integrator-cpufreq.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/integrator-cpufreq.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/integrator-cpufreq.c 2015-03-09 09:22:18.377023945 -0400
|
|
|
a8a466 |
@@ -121,7 +121,7 @@
|
|
|
a8a466 |
return 0;
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_begin(policy, &freqs);
|
|
|
a8a466 |
|
|
|
a8a466 |
cm_osc = __raw_readl(CM_OSC);
|
|
|
a8a466 |
|
|
|
a8a466 |
@@ -142,7 +142,7 @@
|
|
|
a8a466 |
*/
|
|
|
a8a466 |
set_cpus_allowed(current, cpus_allowed);
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_end(policy, &freqs, 0);
|
|
|
a8a466 |
|
|
|
a8a466 |
return 0;
|
|
|
a8a466 |
}
|
|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/longhaul.c linux-3.10.0-229.el7/drivers/cpufreq/longhaul.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/longhaul.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/longhaul.c 2015-03-09 09:22:18.377023945 -0400
|
|
|
a8a466 |
@@ -269,7 +269,7 @@
|
|
|
a8a466 |
freqs.old = calc_speed(longhaul_get_cpu_mult());
|
|
|
a8a466 |
freqs.new = speed;
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_begin(policy, &freqs);
|
|
|
a8a466 |
|
|
|
a8a466 |
pr_debug("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n",
|
|
|
a8a466 |
fsb, mult/10, mult%10, print_speed(speed/1000));
|
|
|
a8a466 |
@@ -386,7 +386,7 @@
|
|
|
a8a466 |
}
|
|
|
a8a466 |
}
|
|
|
a8a466 |
/* Report true CPU frequency */
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_end(policy, &freqs, 0);
|
|
|
a8a466 |
|
|
|
a8a466 |
if (!bm_timeout)
|
|
|
a8a466 |
printk(KERN_INFO PFX "Warning: Timeout while waiting for "
|
|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k6.c linux-3.10.0-229.el7/drivers/cpufreq/powernow-k6.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k6.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/powernow-k6.c 2015-03-09 09:23:09.182024898 -0400
|
|
|
a8a466 |
@@ -83,7 +83,7 @@
|
|
|
a8a466 |
freqs.old = busfreq * powernow_k6_get_cpu_multiplier();
|
|
|
a8a466 |
freqs.new = busfreq * clock_ratio[best_i].driver_data;
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_begin(policy, &freqs);
|
|
|
a8a466 |
|
|
|
a8a466 |
/* we now need to transform best_i to the BVC format, see AMD#23446 */
|
|
|
a8a466 |
|
|
|
a8a466 |
@@ -98,7 +98,7 @@
|
|
|
a8a466 |
msrval = POWERNOW_IOPORT + 0x0;
|
|
|
a8a466 |
wrmsr(MSR_K6_EPMR, msrval, 0); /* disable it again */
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_end(policy, &freqs, 0);
|
|
|
a8a466 |
|
|
|
a8a466 |
return;
|
|
|
a8a466 |
}
|
|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k7.c linux-3.10.0-229.el7/drivers/cpufreq/powernow-k7.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k7.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/powernow-k7.c 2015-03-09 09:23:52.126025704 -0400
|
|
|
a8a466 |
@@ -269,7 +269,7 @@
|
|
|
a8a466 |
|
|
|
a8a466 |
freqs.new = powernow_table[index].frequency;
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_begin(policy, &freqs);
|
|
|
a8a466 |
|
|
|
a8a466 |
/* Now do the magic poking into the MSRs. */
|
|
|
a8a466 |
|
|
|
a8a466 |
@@ -290,7 +290,7 @@
|
|
|
a8a466 |
if (have_a0 == 1)
|
|
|
a8a466 |
local_irq_enable();
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_end(policy, &freqs, 0);
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
|
|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/sh-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/sh-cpufreq.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/sh-cpufreq.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/sh-cpufreq.c 2015-03-09 09:22:18.378023945 -0400
|
|
|
a8a466 |
@@ -68,10 +68,10 @@
|
|
|
a8a466 |
freqs.new = (freq + 500) / 1000;
|
|
|
a8a466 |
freqs.flags = 0;
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_begin(policy, &freqs);
|
|
|
a8a466 |
set_cpus_allowed_ptr(current, &cpus_allowed);
|
|
|
a8a466 |
clk_set_rate(cpuclk, freq);
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_end(policy, &freqs, 0);
|
|
|
a8a466 |
|
|
|
a8a466 |
dev_dbg(dev, "set frequency %lu Hz\n", freq);
|
|
|
a8a466 |
|
|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-centrino.c linux-3.10.0-229.el7/drivers/cpufreq/speedstep-centrino.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-centrino.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/speedstep-centrino.c 2015-03-09 09:58:30.112064688 -0400
|
|
|
a8a466 |
@@ -345,7 +345,6 @@
|
|
|
a8a466 |
struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu);
|
|
|
a8a466 |
unsigned freq;
|
|
|
a8a466 |
unsigned l, h;
|
|
|
a8a466 |
- int ret;
|
|
|
a8a466 |
int i;
|
|
|
a8a466 |
|
|
|
a8a466 |
/* Only Intel makes Enhanced Speedstep-capable CPUs */
|
|
|
a8a466 |
@@ -402,15 +401,8 @@
|
|
|
a8a466 |
|
|
|
a8a466 |
pr_debug("centrino_cpu_init: cur=%dkHz\n", policy->cur);
|
|
|
a8a466 |
|
|
|
a8a466 |
- ret = cpufreq_frequency_table_cpuinfo(policy,
|
|
|
a8a466 |
+ return cpufreq_table_validate_and_show(policy,
|
|
|
a8a466 |
per_cpu(centrino_model, policy->cpu)->op_points);
|
|
|
a8a466 |
- if (ret)
|
|
|
a8a466 |
- return (ret);
|
|
|
a8a466 |
-
|
|
|
a8a466 |
- cpufreq_frequency_table_get_attr(
|
|
|
a8a466 |
- per_cpu(centrino_model, policy->cpu)->op_points, policy->cpu);
|
|
|
a8a466 |
-
|
|
|
a8a466 |
- return 0;
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
static int centrino_cpu_exit(struct cpufreq_policy *policy)
|
|
|
a8a466 |
@@ -428,19 +420,6 @@
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
/**
|
|
|
a8a466 |
- * centrino_verify - verifies a new CPUFreq policy
|
|
|
a8a466 |
- * @policy: new policy
|
|
|
a8a466 |
- *
|
|
|
a8a466 |
- * Limit must be within this model's frequency range at least one
|
|
|
a8a466 |
- * border included.
|
|
|
a8a466 |
- */
|
|
|
a8a466 |
-static int centrino_verify (struct cpufreq_policy *policy)
|
|
|
a8a466 |
-{
|
|
|
a8a466 |
- return cpufreq_frequency_table_verify(policy,
|
|
|
a8a466 |
- per_cpu(centrino_model, policy->cpu)->op_points);
|
|
|
a8a466 |
-}
|
|
|
a8a466 |
-
|
|
|
a8a466 |
-/**
|
|
|
a8a466 |
* centrino_setpolicy - set a new CPUFreq policy
|
|
|
a8a466 |
* @policy: new policy
|
|
|
a8a466 |
* @target_freq: the target frequency
|
|
|
a8a466 |
@@ -561,20 +540,15 @@
|
|
|
a8a466 |
return retval;
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
-static struct freq_attr* centrino_attr[] = {
|
|
|
a8a466 |
- &cpufreq_freq_attr_scaling_available_freqs,
|
|
|
a8a466 |
- NULL,
|
|
|
a8a466 |
-};
|
|
|
a8a466 |
-
|
|
|
a8a466 |
static struct cpufreq_driver centrino_driver = {
|
|
|
a8a466 |
.name = "centrino", /* should be speedstep-centrino,
|
|
|
a8a466 |
but there's a 16 char limit */
|
|
|
a8a466 |
.init = centrino_cpu_init,
|
|
|
a8a466 |
.exit = centrino_cpu_exit,
|
|
|
a8a466 |
- .verify = centrino_verify,
|
|
|
a8a466 |
+ .verify = cpufreq_generic_frequency_table_verify,
|
|
|
a8a466 |
.target = centrino_target,
|
|
|
a8a466 |
.get = get_cur_freq,
|
|
|
a8a466 |
- .attr = centrino_attr,
|
|
|
a8a466 |
+ .attr = cpufreq_generic_attr,
|
|
|
a8a466 |
};
|
|
|
a8a466 |
|
|
|
a8a466 |
/*
|
|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-ich.c linux-3.10.0-229.el7/drivers/cpufreq/speedstep-ich.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-ich.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/speedstep-ich.c 2015-03-09 09:58:30.113064688 -0400
|
|
|
a8a466 |
@@ -289,18 +289,6 @@
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
|
|
|
a8a466 |
-/**
|
|
|
a8a466 |
- * speedstep_verify - verifies a new CPUFreq policy
|
|
|
a8a466 |
- * @policy: new policy
|
|
|
a8a466 |
- *
|
|
|
a8a466 |
- * Limit must be within speedstep_low_freq and speedstep_high_freq, with
|
|
|
a8a466 |
- * at least one border included.
|
|
|
a8a466 |
- */
|
|
|
a8a466 |
-static int speedstep_verify(struct cpufreq_policy *policy)
|
|
|
a8a466 |
-{
|
|
|
a8a466 |
- return cpufreq_frequency_table_verify(policy, &speedstep_freqs[0]);
|
|
|
a8a466 |
-}
|
|
|
a8a466 |
-
|
|
|
a8a466 |
struct get_freqs {
|
|
|
a8a466 |
struct cpufreq_policy *policy;
|
|
|
a8a466 |
int ret;
|
|
|
a8a466 |
@@ -320,7 +308,6 @@
|
|
|
a8a466 |
|
|
|
a8a466 |
static int speedstep_cpu_init(struct cpufreq_policy *policy)
|
|
|
a8a466 |
{
|
|
|
a8a466 |
- int result;
|
|
|
a8a466 |
unsigned int policy_cpu, speed;
|
|
|
a8a466 |
struct get_freqs gf;
|
|
|
a8a466 |
|
|
|
a8a466 |
@@ -349,36 +336,18 @@
|
|
|
a8a466 |
/* cpuinfo and default policy values */
|
|
|
a8a466 |
policy->cur = speed;
|
|
|
a8a466 |
|
|
|
a8a466 |
- result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs);
|
|
|
a8a466 |
- if (result)
|
|
|
a8a466 |
- return result;
|
|
|
a8a466 |
-
|
|
|
a8a466 |
- cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu);
|
|
|
a8a466 |
-
|
|
|
a8a466 |
- return 0;
|
|
|
a8a466 |
+ return cpufreq_table_validate_and_show(policy, speedstep_freqs);
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
|
|
|
a8a466 |
-static int speedstep_cpu_exit(struct cpufreq_policy *policy)
|
|
|
a8a466 |
-{
|
|
|
a8a466 |
- cpufreq_frequency_table_put_attr(policy->cpu);
|
|
|
a8a466 |
- return 0;
|
|
|
a8a466 |
-}
|
|
|
a8a466 |
-
|
|
|
a8a466 |
-static struct freq_attr *speedstep_attr[] = {
|
|
|
a8a466 |
- &cpufreq_freq_attr_scaling_available_freqs,
|
|
|
a8a466 |
- NULL,
|
|
|
a8a466 |
-};
|
|
|
a8a466 |
-
|
|
|
a8a466 |
-
|
|
|
a8a466 |
static struct cpufreq_driver speedstep_driver = {
|
|
|
a8a466 |
.name = "speedstep-ich",
|
|
|
a8a466 |
- .verify = speedstep_verify,
|
|
|
a8a466 |
+ .verify = cpufreq_generic_frequency_table_verify,
|
|
|
a8a466 |
.target = speedstep_target,
|
|
|
a8a466 |
.init = speedstep_cpu_init,
|
|
|
a8a466 |
- .exit = speedstep_cpu_exit,
|
|
|
a8a466 |
+ .exit = cpufreq_generic_exit,
|
|
|
a8a466 |
.get = speedstep_get,
|
|
|
a8a466 |
- .attr = speedstep_attr,
|
|
|
a8a466 |
+ .attr = cpufreq_generic_attr,
|
|
|
a8a466 |
};
|
|
|
a8a466 |
|
|
|
a8a466 |
static const struct x86_cpu_id ss_smi_ids[] = {
|
|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-smi.c linux-3.10.0-229.el7/drivers/cpufreq/speedstep-smi.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-smi.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/speedstep-smi.c 2015-03-09 09:58:30.113064688 -0400
|
|
|
a8a466 |
@@ -264,19 +264,6 @@
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
|
|
|
a8a466 |
-/**
|
|
|
a8a466 |
- * speedstep_verify - verifies a new CPUFreq policy
|
|
|
a8a466 |
- * @policy: new policy
|
|
|
a8a466 |
- *
|
|
|
a8a466 |
- * Limit must be within speedstep_low_freq and speedstep_high_freq, with
|
|
|
a8a466 |
- * at least one border included.
|
|
|
a8a466 |
- */
|
|
|
a8a466 |
-static int speedstep_verify(struct cpufreq_policy *policy)
|
|
|
a8a466 |
-{
|
|
|
a8a466 |
- return cpufreq_frequency_table_verify(policy, &speedstep_freqs[0]);
|
|
|
a8a466 |
-}
|
|
|
a8a466 |
-
|
|
|
a8a466 |
-
|
|
|
a8a466 |
static int speedstep_cpu_init(struct cpufreq_policy *policy)
|
|
|
a8a466 |
{
|
|
|
a8a466 |
int result;
|
|
|
a8a466 |
@@ -329,19 +316,7 @@
|
|
|
a8a466 |
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
|
|
|
a8a466 |
policy->cur = speed;
|
|
|
a8a466 |
|
|
|
a8a466 |
- result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs);
|
|
|
a8a466 |
- if (result)
|
|
|
a8a466 |
- return result;
|
|
|
a8a466 |
-
|
|
|
a8a466 |
- cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu);
|
|
|
a8a466 |
-
|
|
|
a8a466 |
- return 0;
|
|
|
a8a466 |
-}
|
|
|
a8a466 |
-
|
|
|
a8a466 |
-static int speedstep_cpu_exit(struct cpufreq_policy *policy)
|
|
|
a8a466 |
-{
|
|
|
a8a466 |
- cpufreq_frequency_table_put_attr(policy->cpu);
|
|
|
a8a466 |
- return 0;
|
|
|
a8a466 |
+ return cpufreq_table_validate_and_show(policy, speedstep_freqs);
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
static unsigned int speedstep_get(unsigned int cpu)
|
|
|
a8a466 |
@@ -362,20 +337,15 @@
|
|
|
a8a466 |
return result;
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
-static struct freq_attr *speedstep_attr[] = {
|
|
|
a8a466 |
- &cpufreq_freq_attr_scaling_available_freqs,
|
|
|
a8a466 |
- NULL,
|
|
|
a8a466 |
-};
|
|
|
a8a466 |
-
|
|
|
a8a466 |
static struct cpufreq_driver speedstep_driver = {
|
|
|
a8a466 |
.name = "speedstep-smi",
|
|
|
a8a466 |
- .verify = speedstep_verify,
|
|
|
a8a466 |
+ .verify = cpufreq_generic_frequency_table_verify,
|
|
|
a8a466 |
.target = speedstep_target,
|
|
|
a8a466 |
.init = speedstep_cpu_init,
|
|
|
a8a466 |
- .exit = speedstep_cpu_exit,
|
|
|
a8a466 |
+ .exit = cpufreq_generic_exit,
|
|
|
a8a466 |
.get = speedstep_get,
|
|
|
a8a466 |
.resume = speedstep_resume,
|
|
|
a8a466 |
- .attr = speedstep_attr,
|
|
|
a8a466 |
+ .attr = cpufreq_generic_attr,
|
|
|
a8a466 |
};
|
|
|
a8a466 |
|
|
|
a8a466 |
static const struct x86_cpu_id ss_smi_ids[] = {
|
|
|
a8a466 |
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/unicore2-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/unicore2-cpufreq.c
|
|
|
a8a466 |
--- linux-3.10.0-229.el7.original/drivers/cpufreq/unicore2-cpufreq.c 2015-01-29 18:15:53.000000000 -0500
|
|
|
a8a466 |
+++ linux-3.10.0-229.el7/drivers/cpufreq/unicore2-cpufreq.c 2015-03-09 09:24:33.053026472 -0400
|
|
|
a8a466 |
@@ -50,14 +50,14 @@
|
|
|
a8a466 |
struct cpufreq_freqs freqs;
|
|
|
a8a466 |
struct clk *mclk = clk_get(NULL, "MAIN_CLK");
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_begin(policy, &freqs);
|
|
|
a8a466 |
|
|
|
a8a466 |
if (!clk_set_rate(mclk, target_freq * 1000)) {
|
|
|
a8a466 |
freqs.old = cur;
|
|
|
a8a466 |
freqs.new = target_freq;
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
- cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
|
|
|
a8a466 |
+ cpufreq_freq_transition_end(policy, &freqs, ret);
|
|
|
a8a466 |
|
|
|
a8a466 |
return 0;
|
|
|
a8a466 |
}
|