nxt5656 / rpms / kernel

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