From patchwork Thu Sep 6 07:10:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 1412301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 9C171DFFCF for ; Thu, 6 Sep 2012 07:13:26 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9WEI-0004jA-Ip; Thu, 06 Sep 2012 07:10:22 +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 1T9WEE-0004iW-Vb for linux-arm-kernel@lists.infradead.org; Thu, 06 Sep 2012 07:10:19 +0000 Received: by dajq27 with SMTP id q27so909388daj.36 for ; Thu, 06 Sep 2012 00:10:18 -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=JpWfXmW2bJL+6Wm9s2Ej1xkhP5tuIf9sLV3WKHvh5+I=; b=TgflDRljEZcNG+kz4eol7hWCUDWnYR32BSVIRhPl6tnO13pUtUo88YfR9HOUMMUd3a PiDcMEJygzgfrXS+QQ5QBamq1UTrwvN+fGQhv1+TNgq2Cnd19OXsG1ObtFpcaPWVpl53 EO16zVUe0eSf//LoQZ6KZxgXz82VyNtDvG/bH1FLL0qhIYgM4O3OdfqJ/Z6NN6GNF/CT ovS3y333gB7exYvUT0LOIBalRJsMTjO8x2NcTVGKS6UGfvWcV1htcJoFmYbJd11Kg1ZX tZwcSkkuwPgNSIa8AO4d5l5keZu7oP7v6+4x3IOb0cbW6hFd7r5b8l+RLl1x/oxN2HeH LS/w== Received: by 10.68.229.6 with SMTP id sm6mr3520727pbc.120.1346915418109; Thu, 06 Sep 2012 00:10:18 -0700 (PDT) Received: from localhost.localdomain ([221.225.141.144]) by mx.google.com with ESMTPS id pj10sm871354pbb.46.2012.09.06.00.10.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Sep 2012 00:10:16 -0700 (PDT) From: Shawn Guo To: "Rafael J. Wysocki" Subject: [PATCH] cpufreq: OMAP: remove redundant loops_per_jiffy code Date: Thu, 6 Sep 2012 15:10:24 +0800 Message-Id: <1346915424-25868-1-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.5.4 X-Gm-Message-State: ALoCoQmW0zylWZrjZHjvwwI0bq0xUPDJspCTsI0dPbAkuGf6jy8xW7I2KFkh56nR1ZOZHBbZKVmV 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: Kevin Hilman , Shawn Guo , linux-arm-kernel@lists.infradead.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.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 With ARM smp common code updating loops_per_jiffy in a cpufreq transiton notifier call, the loops_per_jiffy code in omap-cpufreq driver becomes redundant. Remove it. Signed-off-by: Shawn Guo Cc: 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 */