public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq: exynos: Broadcast frequency change notifications for all cores
@ 2012-11-13  9:26 Tomasz Figa
  2012-11-21 13:52 ` Tomasz Figa
  2013-01-31  4:20 ` Viresh Kumar
  0 siblings, 2 replies; 13+ messages in thread
From: Tomasz Figa @ 2012-11-13  9:26 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-arm-kernel, linux-samsung-soc, Kyungmin Park, Kukjin Kim,
	Marek Szyprowski, Bartlomiej Zolnierkiewicz, Rafael J. Wysocki

On Exynos SoCs all cores share the same frequency setting, so changing
frequency of one core will affect rest of cores.

This patch modifies the exynos-cpufreq driver to inform cpufreq core
about this behavior and broadcast frequency change notifications for all
cores.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/cpufreq/exynos-cpufreq.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index af2d81e..c0d54a8 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -100,7 +100,8 @@ static int exynos_target(struct cpufreq_policy *policy,
 	}
 	arm_volt = volt_table[index];
 
-	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
+	for_each_cpu(freqs.cpu, policy->cpus)
+		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
 
 	/* When the new frequency is higher than current frequency */
 	if ((freqs.new > freqs.old) && !safe_arm_volt) {
@@ -115,7 +116,8 @@ static int exynos_target(struct cpufreq_policy *policy,
 	if (freqs.new != freqs.old)
 		exynos_info->set_freq(old_index, index);
 
-	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
+	for_each_cpu(freqs.cpu, policy->cpus)
+		cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
 
 	/* When the new frequency is lower than current frequency */
 	if ((freqs.new < freqs.old) ||
@@ -235,6 +237,7 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
 		cpumask_copy(policy->related_cpus, cpu_possible_mask);
 		cpumask_copy(policy->cpus, cpu_online_mask);
 	} else {
+		policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
 		cpumask_setall(policy->cpus);
 	}
 
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-02-01  3:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-13  9:26 [PATCH] cpufreq: exynos: Broadcast frequency change notifications for all cores Tomasz Figa
2012-11-21 13:52 ` Tomasz Figa
2012-11-21 20:47   ` Rafael J. Wysocki
2012-11-21 21:23     ` Tomasz Figa
2012-11-21 23:41       ` Rafael J. Wysocki
2013-01-31  4:20 ` Viresh Kumar
2013-01-31 14:45   ` Tomasz Figa
2013-01-31 14:52     ` Viresh Kumar
2013-01-31 15:04       ` Tomasz Figa
2013-01-31 15:16         ` Viresh Kumar
2013-01-31 16:07           ` Tomasz Figa
2013-01-31 16:12             ` Viresh Kumar
2013-02-01  3:47               ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox