From patchwork Sat Apr 28 03:28:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 8298 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 045F723E47 for ; Sat, 28 Apr 2012 03:29:26 +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 BBDFDA180B3 for ; Sat, 28 Apr 2012 03:29:25 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2563405iag.11 for ; Fri, 27 Apr 2012 20:29:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :x-spamscore:x-bigfish:x-forefront-antispam-report:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:x-originatororg:x-gm-message-state; bh=KdWxsj8T7NM+jbr0di8CFsfTd0ll04WQk27AVpV+Gfc=; b=B9ZTcQm0Lscj4e0wX192cBEW2QZpCzoN11uNk1T9CL8xIT/t2BGl5xImwEBIWqgAXP NJ4D679NbVgGBWfi0mN2ddsll7U8mXXNGXXJeGAZ32I1Sw3pinUfLqOUCCl3g3d3D5d2 e5KYuy2xoefjX+vcMH81DHba/fQXBmj8vZW3DFMUHZgONeTz+J5zadrUA5PWXWR4SwYi RG1HSOWIWJVBPpKG/FA0aBag2NElKekHRQ2fc1VFsDDG/qAqLxht5TLXn/9heDg7a8W7 Hz6PP+867i1u3r6otf8oSFtCLUdOymZ5f2DsdA847XuZXrR1Mo40wWbVdYOhQ4D/JqeT PpDA== Received: by 10.50.41.201 with SMTP id h9mr4690871igl.19.1335583765477; Fri, 27 Apr 2012 20:29:25 -0700 (PDT) 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.137.198 with SMTP id x6csp67124ibt; Fri, 27 Apr 2012 20:29:24 -0700 (PDT) Received: by 10.68.191.4 with SMTP id gu4mr17264945pbc.125.1335583764652; Fri, 27 Apr 2012 20:29:24 -0700 (PDT) Received: from va3outboundpool.messaging.microsoft.com (va3ehsobe005.messaging.microsoft.com. [216.32.180.31]) by mx.google.com with ESMTPS id s4si8713969pbc.105.2012.04.27.20.29.24 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Apr 2012 20:29:24 -0700 (PDT) Received-SPF: neutral (google.com: 216.32.180.31 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) client-ip=216.32.180.31; Authentication-Results: mx.google.com; spf=neutral (google.com: 216.32.180.31 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) smtp.mail=B20223@freescale.com Received: from mail186-va3-R.bigfish.com (10.7.14.240) by VA3EHSOBE008.bigfish.com (10.7.40.28) with Microsoft SMTP Server id 14.1.225.23; Sat, 28 Apr 2012 03:29:20 +0000 Received: from mail186-va3 (localhost [127.0.0.1]) by mail186-va3-R.bigfish.com (Postfix) with ESMTP id 98FFD340AEA; Sat, 28 Apr 2012 03:29:20 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bh) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail186-va3 (localhost.localdomain [127.0.0.1]) by mail186-va3 (MessageSwitch) id 1335583758522383_5427; Sat, 28 Apr 2012 03:29:18 +0000 (UTC) Received: from VA3EHSMHS020.bigfish.com (unknown [10.7.14.238]) by mail186-va3.bigfish.com (Postfix) with ESMTP id 79A6430026E; Sat, 28 Apr 2012 03:29:18 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS020.bigfish.com (10.7.99.30) with Microsoft SMTP Server (TLS) id 14.1.225.23; Sat, 28 Apr 2012 03:29:17 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.355.3; Fri, 27 Apr 2012 22:29:19 -0500 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 q3S3T8g2028456; Fri, 27 Apr 2012 22:29:16 -0500 (CDT) From: Richard Zhao To: , CC: , , , , , , Richard Zhao Subject: [RESEND PATCH 2/2] cpufreq: OMAP: remove loops_per_jiffy recalculate for smp Date: Sat, 28 Apr 2012 11:28:43 +0800 Message-ID: <1335583723-18915-2-git-send-email-richard.zhao@freescale.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1335583723-18915-1-git-send-email-richard.zhao@freescale.com> References: <1335583723-18915-1-git-send-email-richard.zhao@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-Gm-Message-State: ALoCoQnP8n/bC2Ew3IIkzSFB8hGqw1fcD7UdLvAmY2WENHoyPYnWTUQFC0fLAw8ejni3zMiqkewa arm registered cpufreq transition notifier to recalculate it. Signed-off-by: Richard Zhao Acked-by: Santosh Shilimkar --- 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 */