fedoraproject@6speed.de / rpms / kernel

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