ignatenkobrain / rpms / kernel

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