From patchwork Wed Feb 29 07:18:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 6999 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 47E3423EAF for ; Wed, 29 Feb 2012 07:18:38 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 10CCCA180DB for ; Wed, 29 Feb 2012 07:18:37 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2786662iag.11 for ; Tue, 28 Feb 2012 23:18:37 -0800 (PST) Received: from mr.google.com ([10.50.207.72]) by 10.50.207.72 with SMTP id lu8mr25775397igc.0.1330499917908 (num_hops = 1); Tue, 28 Feb 2012 23:18:37 -0800 (PST) Received: by 10.50.207.72 with SMTP id lu8mr20899624igc.0.1330499917865; Tue, 28 Feb 2012 23:18:37 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.11.10 with SMTP id r10csp26276ibr; Tue, 28 Feb 2012 23:18:37 -0800 (PST) Received: by 10.216.52.14 with SMTP id d14mr4796182wec.35.1330499916689; Tue, 28 Feb 2012 23:18:36 -0800 (PST) Received: from DB3EHSOBE006.bigfish.com (db3ehsobe001.messaging.microsoft.com. [213.199.154.139]) by mx.google.com with ESMTPS id fe3si15335126wib.40.2012.02.28.23.18.36 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Feb 2012 23:18:36 -0800 (PST) Received-SPF: neutral (google.com: 213.199.154.139 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=213.199.154.139; Authentication-Results: mx.google.com; spf=neutral (google.com: 213.199.154.139 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: from mail51-db3-R.bigfish.com (10.3.81.237) by DB3EHSOBE006.bigfish.com (10.3.84.26) with Microsoft SMTP Server id 14.1.225.23; Wed, 29 Feb 2012 07:18:36 +0000 Received: from mail51-db3 (localhost [127.0.0.1]) by mail51-db3-R.bigfish.com (Postfix) with ESMTP id DB11A3802BB; Wed, 29 Feb 2012 07:18:35 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail51-db3 (localhost.localdomain [127.0.0.1]) by mail51-db3 (MessageSwitch) id 1330499913599068_19530; Wed, 29 Feb 2012 07:18:33 +0000 (UTC) Received: from DB3EHSMHS007.bigfish.com (unknown [10.3.81.233]) by mail51-db3.bigfish.com (Postfix) with ESMTP id 8ADE1300063; Wed, 29 Feb 2012 07:18:33 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS007.bigfish.com (10.3.87.107) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 29 Feb 2012 07:18:33 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.355.3; Wed, 29 Feb 2012 01:18:31 -0600 Received: from b20223-02.ap.freescale.net (b20223-02.ap.freescale.net [10.192.242.124]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id q1T7IH9j008037; Wed, 29 Feb 2012 01:18:28 -0600 (CST) From: Richard Zhao To: , CC: , , , , , , , , , Richard Zhao Subject: [PATCH 2/2] cpufreq: OMAP: remove loops_per_jiffy recalculate for smp Date: Wed, 29 Feb 2012 15:18:15 +0800 Message-ID: <1330499895-12364-3-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1330499895-12364-1-git-send-email-richard.zhao@linaro.org> References: <1330499895-12364-1-git-send-email-richard.zhao@linaro.org> MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com X-Gm-Message-State: ALoCoQmtrld0RgvxEsWArI3vl2BW3Xf37UEMoK3oPXNfGEV8CX7OWJVW3CKrV5i+sdENacJp8Ur1 arm registered cpufreq transition notifier to recalculate it. Signed-off-by: Richard Zhao Acked-by: Santosh Shilimkar --- drivers/cpufreq/omap-cpufreq.c | 36 ------------------------------------ 1 files changed, 0 insertions(+), 36 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 5d04c57..17da4c4 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c @@ -37,16 +37,6 @@ #include -#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; @@ -118,32 +108,6 @@ static int omap_target(struct cpufreq_policy *policy, ret = clk_set_rate(mpu_clk, freqs.new * 1000); 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 - /* notifiers */ for_each_cpu(i, policy->cpus) { freqs.cpu = i;