From patchwork Fri Feb 14 11:00:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 24623 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 665D4203C4 for ; Fri, 14 Feb 2014 11:01:10 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id g12sf48928341oah.2 for ; Fri, 14 Feb 2014 03:01:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=CFhkJFcEhWmlhNEj4HIvTyxYbZNff+5+GQ+pfi3qP4A=; b=FFRexfR+ocZxRWFAHlXIScsp87fdlEQpL0YxacobtiN2HD2dTYXDzWyvGZQCUHzWZZ YGb1jNWauYVXJBCkbRgwE22b/FBWpgCMqsMmuCcbaB71qS8hLgMGzbuezMFVvxvxrrDY kAF/PjUveaHX5mAnQFrKA6O1bVOlg3KK451Qvc90OB2q9gOkFbIqAc5t9tMd5v+5cqxk 6+XJPGKw+nbwvF+FVzsVYZdBzwet8DdggW2CITzWE9Pe/eSyLdx4Vqv7VUHMcaLvB0HO v3xbNSiSs939EIEv59bbueETypwxRJ7NiULh4ui9jvToh8m+kZa1CPgVKA3TAkYLW7Ng PcYQ== X-Gm-Message-State: ALoCoQm6FR+ds41PWkoGOcRpnRxkk6rgX8SmHN+kJAtdYiHCWMae/vhP4+Ni3C3TZfbiS8Rk+Gaf X-Received: by 10.182.219.226 with SMTP id pr2mr2749471obc.44.1392375669228; Fri, 14 Feb 2014 03:01:09 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.240 with SMTP id b103ls37824qge.57.gmail; Fri, 14 Feb 2014 03:01:09 -0800 (PST) X-Received: by 10.220.106.84 with SMTP id w20mr5000176vco.18.1392375669151; Fri, 14 Feb 2014 03:01:09 -0800 (PST) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id yj2si1805827veb.9.2014.02.14.03.01.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:01:09 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.180 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.180; Received: by mail-vc0-f180.google.com with SMTP id ks9so9049069vcb.39 for ; Fri, 14 Feb 2014 03:01:08 -0800 (PST) X-Received: by 10.52.65.171 with SMTP id y11mr180816vds.52.1392375668759; Fri, 14 Feb 2014 03:01:08 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp99616vcz; Fri, 14 Feb 2014 03:01:08 -0800 (PST) X-Received: by 10.68.171.4 with SMTP id aq4mr8319487pbc.150.1392375667879; Fri, 14 Feb 2014 03:01:07 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pp3si4414265pbb.229.2014.02.14.03.01.07; Fri, 14 Feb 2014 03:01:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of cpufreq-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752172AbaBNLA7 (ORCPT + 6 others); Fri, 14 Feb 2014 06:00:59 -0500 Received: from mail-wi0-f180.google.com ([209.85.212.180]:54981 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751562AbaBNLA6 (ORCPT ); Fri, 14 Feb 2014 06:00:58 -0500 Received: by mail-wi0-f180.google.com with SMTP id hm4so336490wib.7 for ; Fri, 14 Feb 2014 03:00:57 -0800 (PST) X-Received: by 10.180.12.115 with SMTP id x19mr1653675wib.19.1392375656948; Fri, 14 Feb 2014 03:00:56 -0800 (PST) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id pm2sm3974956wic.0.2014.02.14.03.00.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:00:56 -0800 (PST) From: Viresh Kumar To: rjw@rjwysocki.net Cc: linaro-kernel@lists.linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, pierre-list@ossman.eu, Viresh Kumar Subject: [PATCH 2/2] cpufreq: don't call cpufreq_update_policy() on CPU addition Date: Fri, 14 Feb 2014 16:30:41 +0530 Message-Id: <8f2fc4d6240b567fdb69a0b47f073d174b7ef9b2.1392375504.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: <15ccc0609cb9ee3db0ad3a95b29bf69d11ea197c.1392375504.git.viresh.kumar@linaro.org> References: <15ccc0609cb9ee3db0ad3a95b29bf69d11ea197c.1392375504.git.viresh.kumar@linaro.org> In-Reply-To: <15ccc0609cb9ee3db0ad3a95b29bf69d11ea197c.1392375504.git.viresh.kumar@linaro.org> References: <15ccc0609cb9ee3db0ad3a95b29bf69d11ea197c.1392375504.git.viresh.kumar@linaro.org> Sender: cpufreq-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: cpufreq@vger.kernel.org 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.180 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , cpufreq_update_policy() is called from two places currently. From a workqueue handled queued from cpufreq_bp_resume() for boot CPU and from cpufreq_cpu_callback() whenever a CPU is added. The first one makes sure that boot CPU is running on the frequency present in policy->cpu. But we don't really need a call from cpufreq_cpu_callback(), because we always call cpufreq_driver->init() (which will set policy->cur correctly) whenever first CPU of any policy is added back. And so every policy structure is guaranteed to have the right frequency in policy->cur. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 383362b..b6eb4ed 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2194,7 +2194,6 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb, switch (action & ~CPU_TASKS_FROZEN) { case CPU_ONLINE: __cpufreq_add_dev(dev, NULL, frozen); - cpufreq_update_policy(cpu); break; case CPU_DOWN_PREPARE: