From patchwork Fri Aug 16 02:25:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19195 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BCBF12486D for ; Fri, 16 Aug 2013 02:28:37 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id f64sf234290yha.2 for ; Thu, 15 Aug 2013 19:28:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=TQJgRQnnZGtjrrvK9DAo9BYEm8YpMt7BSl/GhVpWUhA=; b=n+UqI/YAIW7MgSTCG9Khj64FbWUgj8Lpx56GUNpCYEUZsvKFmxD39Obq+Qxa5GuoLf ZEJUkHKHz7J0QXLB4YxtcTrMFylS/UiiO2UCzngDBRNphypp3gRekQH0OWFKI//yKDoj /3Mmg95Il/ryufHyvhNledyLrbQ9pFZVeqIwn/RL4MOuZRp5KlT7YX02OLFLU0Pl8Xot BDVI3HcoNHAysCh1iotSwVx9YE1tkvgyiHzukZ1ycVS/Td7KrSP3yRGHyLI1jwg/PPgT LNq0BaDI8YYLLMDKtl3FH95NtIIFQ/YU19+3t0ib7vsEfytfj1xgILHTtSibcqbOvL7V NciA== X-Received: by 10.58.203.133 with SMTP id kq5mr5531984vec.30.1376620117259; Thu, 15 Aug 2013 19:28:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.8 with SMTP id g8ls605665qeg.67.gmail; Thu, 15 Aug 2013 19:28:37 -0700 (PDT) X-Received: by 10.58.217.167 with SMTP id oz7mr17229191vec.15.1376620117142; Thu, 15 Aug 2013 19:28:37 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id mq14si759342vcb.56.2013.08.15.19.28.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ia10so1070712vcb.34 for ; Thu, 15 Aug 2013 19:28:37 -0700 (PDT) X-Gm-Message-State: ALoCoQm+J7WiPopUY2GgET+sDMDP4MuZDqUaD0xIPmckaSA+Iknc4j4k/UINEsOF0djY/VGDyX/K X-Received: by 10.58.165.70 with SMTP id yw6mr17376932veb.19.1376620117061; Thu, 15 Aug 2013 19:28:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp45224vcz; Thu, 15 Aug 2013 19:28:36 -0700 (PDT) X-Received: by 10.66.255.104 with SMTP id ap8mr658781pad.53.1376620116164; Thu, 15 Aug 2013 19:28:36 -0700 (PDT) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by mx.google.com with ESMTPS id ql10si1641603pbb.250.2013.08.15.19.28.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.48; Received: by mail-pa0-f48.google.com with SMTP id kp13so1335719pab.21 for ; Thu, 15 Aug 2013 19:28:35 -0700 (PDT) X-Received: by 10.67.23.164 with SMTP id ib4mr49430pad.42.1376620115762; Thu, 15 Aug 2013 19:28:35 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ia5sm2693203pbc.42.2013.08.15.19.28.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:28:35 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [PATCH 22/34] cpufreq: pasemi: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55:19 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Most of the drivers do following in their ->target_index() routines: struct cpufreq_freqs freqs; freqs.old = old freq... freqs.new = new freq... cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); /* Change rate here */ cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); This is replicated over all cpufreq drivers today and there doesn't exists a good enough reason why this shouldn't be moved to cpufreq core instead. Earlier patches have added support in cpufreq core to do cpufreq notification on frequency change, this one removes it from this driver. Some related minor cleanups are also done along with it. Signed-off-by: Viresh Kumar --- drivers/cpufreq/pasemi-cpufreq.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c index aaee5fa..4d69958 100644 --- a/drivers/cpufreq/pasemi-cpufreq.c +++ b/drivers/cpufreq/pasemi-cpufreq.c @@ -51,8 +51,6 @@ static void __iomem *sdcpwr_mapbase; static void __iomem *sdcasr_mapbase; -static DEFINE_MUTEX(pas_switch_mutex); - /* Current astate, is used when waking up from power savings on * one core, in case the other core has switched states during * the idle time. @@ -249,15 +247,8 @@ static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy) static int pas_cpufreq_target(struct cpufreq_policy *policy, unsigned int pas_astate_new) { - struct cpufreq_freqs freqs; int i; - freqs.old = policy->cur; - freqs.new = pas_freqs[pas_astate_new].frequency; - - mutex_lock(&pas_switch_mutex); - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - pr_debug("setting frequency for cpu %d to %d kHz, 1/%d of max frequency\n", policy->cpu, pas_freqs[pas_astate_new].frequency, @@ -268,10 +259,7 @@ static int pas_cpufreq_target(struct cpufreq_policy *policy, for_each_online_cpu(i) set_astate(i, pas_astate_new); - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - mutex_unlock(&pas_switch_mutex); - - ppc_proc_freq = freqs.new * 1000ul; + ppc_proc_freq = pas_freqs[pas_astate_new].frequency * 1000ul; return 0; }