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: 1732971 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 2719B3FC8A for ; Tue, 13 Nov 2012 09:28:13 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TYClF-0002xa-TI; Tue, 13 Nov 2012 09:26:25 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TYClB-0002wf-K0 for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2012 09:26:23 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MDF0097266XSWG0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2012 18:26:16 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-2a-50a21238dd4d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id B6.52.12699.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> for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2012 18:26:16 +0900 (KST) From: Tomasz Figa To: linux-pm@vger.kernel.org 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 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPLMWRmVeSWpSXmKPExsVy+t9jQV0LoUUBBstbdSw2Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAlfGilWbmQr6+SpWPzvB0sD4i7uLkZNDQsBE4sen3WwQtpjEhXvr gWwuDiGB6YwSV3Y/Zodw1jJJ3D73hhWkik1ATeJzwyOwDhEBGYmpV/azghQxC1xkktg3+Rc7 SEJYIEqi/cglsCIWAVWJzd8XMIPYvAKaEqfnzQUbxC+gLvFu21MmEFtUwFliRfN9NogaQYkf k++xgNjMAvIS+/ZPZYWwtSTW7zzONIGRfxaSsllIymYhKVvAyLyKUTS1ILmgOCk910ivODG3 uDQvXS85P3cTIzjYnknvYFzVYHGIUYCDUYmHV9FyYYAQa2JZcWXuIUYJDmYlEd4fHIsChHhT EiurUovy44tKc1KLDzFKc7AoifM2e6QECAmkJ5akZqemFqQWwWSZODilGhhTwsWqJd7mB+q5 7lrBkel9Yd9HEckVV99Wr98hu5Nz3fb1oXOuzOHWKZ8TsMrm2Z7utleTeo2d1HumyydkPZHn E/y1/LTQtUu2l5PTvq17clf6ZWdHclOz6LYgfp/4WzVf9lfnZL0+1LPy+eqHLxYKez+1uMJo Jz9B79D3r4ZejzsT/9+zqwtVYinOSDTUYi4qTgQAiiMHzDICAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121113_042621_967727_4B062239 X-CRM114-Status: GOOD ( 10.16 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.25 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 T_MANY_HDRS_LCASE Odd capitalization of multiple message headers Cc: Kukjin Kim , Bartlomiej Zolnierkiewicz , "Rafael J. Wysocki" , Kyungmin Park , linux-samsung-soc , linux-arm-kernel , Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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); }