From patchwork Fri Sep 7 01:23:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 1418681 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 421853FC71 for ; Fri, 7 Sep 2012 01:27:19 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9nIp-00068x-Ty; Fri, 07 Sep 2012 01:24:12 +0000 Received: from mail-pz0-f49.google.com ([209.85.210.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T9nIl-00067f-Hj for linux-arm-kernel@lists.infradead.org; Fri, 07 Sep 2012 01:24:08 +0000 Received: by mail-pz0-f49.google.com with SMTP id q27so1462937daj.36 for ; Thu, 06 Sep 2012 18:24:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=raS0PjQ4MXhY9YBid8AlP5+8gTNB7vqH9JVY1WpmvLc=; b=Qmk0KOlFgp5IcZSpmm3jq+Yo7mP0+V66SlDwc6wbBdQTKt80Vp7OUjgQ/fYy12hNQc 0jqqmIgWaMlE5PaQzvRYX6Z3zJAskQXAJTbcIKcN/6TOKbj/OtNgSJEE0Eubsr/NoOEn SrQF8edmZ2LGoGbEtKnDDmANL9By3QXZzEX4g+jH4MPAtRCKVG/dGCOamS1NSyzh3TG7 4mettprCI3pAtx2xpWeDzI+do80e7e2IUDrEP/A/DPo+PyWRxieaME36abi2VJfiNGc/ ZB+2GJIRFyaSRLpaRjH5NjG4fEi74gd1bqOvPmhnxIh3geyll5RS+BdPRfORn647+cLv xRig== Received: by 10.68.223.3 with SMTP id qq3mr7478792pbc.88.1346981047052; Thu, 06 Sep 2012 18:24:07 -0700 (PDT) Received: from localhost.localdomain ([221.225.141.144]) by mx.google.com with ESMTPS id hx9sm2249733pbc.68.2012.09.06.18.24.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Sep 2012 18:24:04 -0700 (PDT) From: Shawn Guo To: Kevin Hilman Subject: [PATCH] cpufreq: OMAP: remove loops_per_jiffy recalculate for smp Date: Fri, 7 Sep 2012 09:23:42 +0800 Message-Id: <1346981022-28011-1-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.5.4 X-Gm-Message-State: ALoCoQnON1j7d0OnCXkv9ujD6iJ6vge8U/6SPCbVa3pmrIiBMkga7ishfX4txpoOfClgCpSlBA1U X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.49 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-pm@vger.kernel.org, cpufreq@vger.kernel.org, "Rafael J. Wysocki" , Richard Zhao , Santosh Shilimkar , Shawn Guo , linux-arm-kernel@lists.infradead.org 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: , 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 From: Richard Zhao With ARM smp common code recalculating loops_per_jiffy in a cpufreq transiton notifier call, the loops_per_jiffy recalculate in omap-cpufreq driver becomes redundant. Remove it. Signed-off-by: Richard Zhao Acked-by: Santosh Shilimkar Signed-off-by: Shawn Guo Acked-by: Kevin Hilman --- drivers/cpufreq/omap-cpufreq.c | 35 ----------------------------------- 1 files changed, 0 insertions(+), 35 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 17fa04d..83a78ad 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c @@ -40,16 +40,6 @@ /* OPP tolerance in percentage */ #define OPP_TOLERANCE 4 -#ifdef CONFIG_SMP -struct lpj_info { - unsigned long ref; - unsigned int freq; -}; - -static DEFINE_PER_CPU(struct lpj_info, lpj_ref); -static struct lpj_info global_lpj_ref; -#endif - static struct cpufreq_frequency_table *freq_table; static atomic_t freq_table_users = ATOMIC_INIT(0); static struct clk *mpu_clk; @@ -161,31 +151,6 @@ static int omap_target(struct cpufreq_policy *policy, } freqs.new = omap_getspeed(policy->cpu); -#ifdef CONFIG_SMP - /* - * Note that loops_per_jiffy is not updated on SMP systems in - * cpufreq driver. So, update the per-CPU loops_per_jiffy value - * on frequency transition. We need to update all dependent CPUs. - */ - for_each_cpu(i, policy->cpus) { - struct lpj_info *lpj = &per_cpu(lpj_ref, i); - if (!lpj->freq) { - lpj->ref = per_cpu(cpu_data, i).loops_per_jiffy; - lpj->freq = freqs.old; - } - - per_cpu(cpu_data, i).loops_per_jiffy = - cpufreq_scale(lpj->ref, lpj->freq, freqs.new); - } - - /* And don't forget to adjust the global one */ - if (!global_lpj_ref.freq) { - global_lpj_ref.ref = loops_per_jiffy; - global_lpj_ref.freq = freqs.old; - } - loops_per_jiffy = cpufreq_scale(global_lpj_ref.ref, global_lpj_ref.freq, - freqs.new); -#endif done: /* notifiers */