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