From patchwork Thu Nov 27 00:37:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41586 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1CD9325E18 for ; Thu, 27 Nov 2014 00:38:33 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id q1sf2412007lam.9 for ; Wed, 26 Nov 2014 16:38:32 -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=j8AJis/uLi8JJAfEMM5QmwvIdL5ZpGVrAEKlvGgFwDs=; b=Oc0r6bghCAC7CvheHYmbCf6E0eZ5AQllCaDx9chWaQnxDDH9ChH1VdoXTbV/j3aWsg g+ZzrLmnBv8y3SMAonSEGS1XEdDnyk8oD5hQrUPEQjx1kIfKo4FoFkoewdxF1STcpJ1h EhUmUB0uxsQSExZl4KCcdgBsXLHYPTt7+3qJKtcmMg2Nlxff/Cqyt5zUSvhp4x162adV NL8Hv0vhRYuChg/kd0XK8ElESoRTgDrtGiu7Y8Ym6LydIuPnprFjzbI1NVSpHhZWxWIa 4vo4gTGufUyCWJXz+GllUxZBOMx9wJFx0JyxKcALJ2j8xs7AqMAuPm2hFyBjlabZq0cE TkCA== X-Gm-Message-State: ALoCoQnn7mv5m1emcJGNnOSyoWofNHc0E5TXAXMyo1L+Ucubay1FKopPm7RUsEqx3wQBoUxhGop3 X-Received: by 10.152.18.136 with SMTP id w8mr4356665lad.5.1417048712046; Wed, 26 Nov 2014 16:38:32 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.228 with SMTP id r4ls420301lal.41.gmail; Wed, 26 Nov 2014 16:38:31 -0800 (PST) X-Received: by 10.112.171.199 with SMTP id aw7mr18897894lbc.40.1417048711527; Wed, 26 Nov 2014 16:38:31 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id jn6si5745870lbc.119.2014.11.26.16.38.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Nov 2014 16:38:31 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id w7so3334505lbi.19 for ; Wed, 26 Nov 2014 16:38:31 -0800 (PST) X-Received: by 10.152.37.69 with SMTP id w5mr35853443laj.67.1417048711438; Wed, 26 Nov 2014 16:38:31 -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.112.184.201 with SMTP id ew9csp725272lbc; Wed, 26 Nov 2014 16:38:30 -0800 (PST) X-Received: by 10.70.10.195 with SMTP id k3mr57522589pdb.41.1417048709737; Wed, 26 Nov 2014 16:38:29 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si9240651pda.28.2014.11.26.16.38.29 for ; Wed, 26 Nov 2014 16:38:29 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752749AbaK0Ai2 (ORCPT + 12 others); Wed, 26 Nov 2014 19:38:28 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:59985 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbaK0Ai2 (ORCPT ); Wed, 26 Nov 2014 19:38:28 -0500 Received: by mail-pa0-f46.google.com with SMTP id lj1so3868715pab.33 for ; Wed, 26 Nov 2014 16:38:27 -0800 (PST) X-Received: by 10.68.227.161 with SMTP id sb1mr2215175pbc.5.1417048707621; Wed, 26 Nov 2014 16:38:27 -0800 (PST) Received: from localhost ([122.167.111.40]) by mx.google.com with ESMTPSA id cy4sm5421472pdb.0.2014.11.26.16.38.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 26 Nov 2014 16:38:27 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , edubezval@gmail.com Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, l.majewski@samsung.com, Viresh Kumar Subject: [PATCH V2 2/4] cpufreq-dt: pass 'policy->related_cpus' to of_cpufreq_cooling_register() Date: Thu, 27 Nov 2014 06:07:50 +0530 Message-Id: <20dee4a7aa3e5fded99f93705bdf7b5623295815.1417048449.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) 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: , The second parameter of of_cpufreq_cooling_register() should be the CPUs to which the frequency constraint will apply. As the cpufreq-dt driver now supports platforms with multiple 'struct cpufreq_policy' instances (i.e. > 1 clock domains for CPUs), passing 'cpu_present_mask' isn't correct anymore. As every policy will have a set of CPUs and that may not be equal to 'cpu_present_mask' always. So, pass only mask of CPUs which are controlled by current policy. Signed-off-by: Viresh Kumar Reviewed-by: Eduardo Valentin Tested-by: Eduardo Valentin --- drivers/cpufreq/cpufreq-dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index 8cba13d..7374fc4 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -274,7 +274,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) * thermal DT code takes care of matching them. */ if (of_find_property(np, "#cooling-cells", NULL)) { - cdev = of_cpufreq_cooling_register(np, cpu_present_mask); + cdev = of_cpufreq_cooling_register(np, policy->related_cpus); if (IS_ERR(cdev)) dev_err(cpu_dev, "running cpufreq without cooling device: %ld\n",