From patchwork Wed Aug 24 06:44:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 1091242 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7O6jDWH005928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 24 Aug 2011 06:45:34 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qw7Cw-0007hI-N9; Wed, 24 Aug 2011 06:45:02 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qw7Cw-00034I-6w; Wed, 24 Aug 2011 06:45:02 +0000 Received: from mail-fx0-f49.google.com ([209.85.161.49]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qw7Cs-00033z-85 for linux-arm-kernel@lists.infradead.org; Wed, 24 Aug 2011 06:44:58 +0000 Received: by fxd20 with SMTP id 20so972195fxd.36 for ; Tue, 23 Aug 2011 23:44:54 -0700 (PDT) Received: by 10.223.1.14 with SMTP id 14mr1174419fad.47.1314168294347; Tue, 23 Aug 2011 23:44:54 -0700 (PDT) Received: from localhost.localdomain (pas72-1-88-161-60-229.fbx.proxad.net [88.161.60.229]) by mx.google.com with ESMTPS id p4sm585738fah.25.2011.08.23.23.44.53 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 23 Aug 2011 23:44:53 -0700 (PDT) From: Vincent Guittot To: linus.walleij@linaro.org, cpufreq@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-dev@lists.linaro.org Subject: [PATCH] ARM: ux500: send cpufreq notification for all cpus Date: Wed, 24 Aug 2011 08:44:05 +0200 Message-Id: <1314168245-2373-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110824_024458_437043_F128823C X-CRM114-Status: GOOD ( 11.17 ) X-Spam-Score: 1.8 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.161.49 listed in list.dnswl.org] 2.5 SUSPICIOUS_RECIPS Similar addresses in recipient list Cc: Vincent Guittot , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 24 Aug 2011 06:45:34 +0000 (UTC) The same clock is used for all cpus so we must notify the frequency change for each one in order to update the configuration of all twd clockevents. Signed-off-by: Vincent Guittot Acked-by: Linus Walleij --- drivers/cpufreq/db8500-cpufreq.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c index 0d8dd1c..4cb5785 100644 --- a/drivers/cpufreq/db8500-cpufreq.c +++ b/drivers/cpufreq/db8500-cpufreq.c @@ -76,13 +76,13 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy, freqs.old = policy->cur; freqs.new = freq_table[idx].frequency; - freqs.cpu = policy->cpu; if (freqs.old == freqs.new) return 0; /* pre-change notification */ - cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); + for_each_online_cpu(freqs.cpu) + cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); /* request the PRCM unit for opp change */ if (prcmu_set_arm_opp(idx2opp[idx])) { @@ -91,7 +91,8 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy, } /* post change notification */ - cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); + for_each_online_cpu(freqs.cpu) + cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); return 0; }