From patchwork Tue Nov 13 09:26:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1732961 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3A6763FCAE for ; Tue, 13 Nov 2012 09:26:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753017Ab2KMJ0T (ORCPT ); Tue, 13 Nov 2012 04:26:19 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:8963 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752003Ab2KMJ0S (ORCPT ); Tue, 13 Nov 2012 04:26:18 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MDF004DR67KGZB0@mailout3.samsung.com>; Tue, 13 Nov 2012 18:26:16 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-78-50a212382cea Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 53.CF.01231.83212A05; Tue, 13 Nov 2012 18:26:16 +0900 (KST) Received: from amdc1227.localnet ([106.116.147.199]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MDF00LCR67QRQ60@mmp2.samsung.com>; Tue, 13 Nov 2012 18:26:16 +0900 (KST) From: Tomasz Figa To: linux-pm@vger.kernel.org Cc: linux-arm-kernel , linux-samsung-soc , Kyungmin Park , Kukjin Kim , Marek Szyprowski , Bartlomiej Zolnierkiewicz , "Rafael J. Wysocki" Subject: [PATCH] cpufreq: exynos: Broadcast frequency change notifications for all cores Date: Tue, 13 Nov 2012 10:26:12 +0100 Message-id: <1887364.fvxYYNb7Mm@amdc1227> Organization: Samsung Poland R&D Center User-Agent: KMail/4.9.2 (Linux/3.6.5-gentoo; KDE/4.9.2; x86_64; ; ) MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=us-ascii X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCLMWRmVeSWpSXmKPExsVy+t9jQV0LoUUBBuuv6lh87j3CaDHj/D4m ByaPz5vkAhijuGxSUnMyy1KL9O0SuDJWrNrMVNDPV7H62QmWBsZf3F2MnBwSAiYSrx/0sELY YhIX7q1n62Lk4hASmM4oseBgNxOE08Ik8eDlFBaQKjYBNYnPDY/YQGwRARmJqVf2s4IUMQtc ZJLYN/kXO0hCWCBKov3IJbAiFgFVic3fFzCD2LwCmhKn580FW8cvoC7xbttTJhBbVMBZYkXz fTaIGkGJH5PvgS1jFpCX2Ld/KiuErSWxfudxpgmM/LOQlM1CUjYLSdkCRuZVjKKpBckFxUnp uYZ6xYm5xaV56XrJ+bmbGMFh90xqB+PKBotDjAIcjEo8vDdcFgYIsSaWFVfmHmKU4GBWEuH9 wbEoQIg3JbGyKrUoP76oNCe1+BCjNAeLkjhvs0dKgJBAemJJanZqakFqEUyWiYNTqoFxaojr 33+fU5LkuPlmlTr3L31v7lEf2/F/YtvC4+8+uPL0fKsr9Fms+2HFywPTMtluJuV/q0m/0Z+y o7z4ucL3Us+/WgGXrkz/u+fw6qTHa19Lvrj7fcp/l4Tbvy+ZVp2NMXyhZxpo0nrwWeIi7avh Mybdv9FVl1HcskP013KGUsYnZ49f5XtSqsRSnJFoqMVcVJwIAFF40jM3AgAA Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 Signed-off-by: Kyungmin Park --- 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); }