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