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