From patchwork Fri Jun 24 10:35:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanjeev Premi X-Patchwork-Id: 915702 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5OAa0Ua026474 for ; Fri, 24 Jun 2011 10:36:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753440Ab1FXKgD (ORCPT ); Fri, 24 Jun 2011 06:36:03 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:50703 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660Ab1FXKgB (ORCPT ); Fri, 24 Jun 2011 06:36:01 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p5OAZth3010019 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 24 Jun 2011 05:35:58 -0500 Received: from dbde70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p5OAZtvb004598; Fri, 24 Jun 2011 16:05:55 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by DBDE70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 8.3.106.1; Fri, 24 Jun 2011 16:05:55 +0530 Received: from psplinux050.india.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p5OAZjPl006812; Fri, 24 Jun 2011 16:05:53 +0530 (IST) From: Sanjeev Premi To: , CC: Sanjeev Premi Subject: [PATCH 2/2] omap2+: pm: cpufreq: Fix loops_per_jiffy calculation Date: Fri, 24 Jun 2011 16:05:42 +0530 Message-ID: <1308911742-27394-3-git-send-email-premi@ti.com> X-Mailer: git-send-email 1.7.2.2 In-Reply-To: <1308911742-27394-1-git-send-email-premi@ti.com> References: <1308911742-27394-1-git-send-email-premi@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 24 Jun 2011 10:36:05 +0000 (UTC) Currently, loops_per_jiffy is being calculated before calling cpufreq_notify_transition(). However, generic cpufreq driver adjusts the jiffies as well. Double adjustment leads to incorrect value being assigned to loops_per_jiffy. This manifests as incorrect BogoMIPS in "cat /proc/cpuinfo' Signed-off-by: Sanjeev Premi --- arch/arm/mach-omap2/omap2plus-cpufreq.c | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c index ce9d534..346519e 100644 --- a/arch/arm/mach-omap2/omap2plus-cpufreq.c +++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c @@ -114,29 +114,13 @@ static int omap_target(struct cpufreq_policy *policy, freqs.new = omap_getspeed(policy->cpu); - /* - * In the generic cpufreq driver jiffies are updated only for - * non-SMP cases. Ensure that jiffies are bing updated for both - * SMP systems and UP systems built with CONFIG_SMP enabled. - */ + /* Notify transitions */ if (is_smp()) { -#ifdef CONFIG_SMP - for_each_cpu(i, policy->cpus) - per_cpu(cpu_data, i).loops_per_jiffy = - cpufreq_scale(per_cpu(cpu_data, i).loops_per_jiffy, - freqs.old, - freqs.new); -#endif - /* Notify transitions */ for_each_cpu(i, policy->cpus) { freqs.cpu = i; cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); } } else { - loops_per_jiffy = cpufreq_scale(loops_per_jiffy, - freqs.old, freqs.new); - - /* Notify transitions */ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); }