From patchwork Wed Nov 26 05:52:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41521 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F086A25E72 for ; Wed, 26 Nov 2014 05:53:30 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id b13sf1318008wgh.9 for ; Tue, 25 Nov 2014 21:53:30 -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=/c/l7pyQMK/rCjv63z0Pjqdl1TiFSEdVGQVDGMmBNOI=; b=cU/mKZCfMafOnBGPV61mbNYAYmIZ9WyyqV1doUGo9Gw/dJPe2ceaS9ImZQytbQxY3c XRp1UunK61avSbYRaLu9RsZj5rUW5QOLu/opg5+Ef7+N8010IAFRdQMQ4ojktmGWbXaa 8qPM7PyE/61g5fU7+0IYXLySIxdjScUYhWyHIyEO9yN80fc4MSgFNpBSP2zBHBeCg7uH 5RPL5LxrRURuDIkTTePLr4KCj+v3oG+i2Tc33Z7gycam8tbQjjDelvLDPDV3M0Zpa/Nd KT3ATaHvFk/3TX8WTaLCai/Ek1QTCKmfe+Z1wotYgUuVQx4rM8tCGZbgkVfzfvz4a0rx m1dg== X-Gm-Message-State: ALoCoQkKUkNq5nzQzLC1B2MWP/Fe6xfgDBXVAERm7wUZJFoTmZicEO7lbnnWSwPAONx2T6EmwRom X-Received: by 10.112.151.38 with SMTP id un6mr8688299lbb.0.1416981210206; Tue, 25 Nov 2014 21:53:30 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.134 with SMTP id b6ls586478laa.77.gmail; Tue, 25 Nov 2014 21:53:29 -0800 (PST) X-Received: by 10.112.167.130 with SMTP id zo2mr32141417lbb.4.1416981209970; Tue, 25 Nov 2014 21:53:29 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id b4si3306126lbd.70.2014.11.25.21.53.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 21:53:29 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id l4so1795993lbv.39 for ; Tue, 25 Nov 2014 21:53:29 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr31520732laz.27.1416981209565; Tue, 25 Nov 2014 21:53:29 -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 ew9csp572422lbc; Tue, 25 Nov 2014 21:53:28 -0800 (PST) X-Received: by 10.70.128.132 with SMTP id no4mr50131887pdb.125.1416981208014; Tue, 25 Nov 2014 21:53:28 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fl2si5023000pad.233.2014.11.25.21.53.27 for ; Tue, 25 Nov 2014 21:53:28 -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 S1752212AbaKZFx0 (ORCPT + 12 others); Wed, 26 Nov 2014 00:53:26 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:38004 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209AbaKZFx0 (ORCPT ); Wed, 26 Nov 2014 00:53:26 -0500 Received: by mail-pa0-f41.google.com with SMTP id rd3so2188474pab.0 for ; Tue, 25 Nov 2014 21:53:25 -0800 (PST) X-Received: by 10.66.140.76 with SMTP id re12mr48684804pab.147.1416981205654; Tue, 25 Nov 2014 21:53:25 -0800 (PST) Received: from localhost ([122.167.111.40]) by mx.google.com with ESMTPSA id cl11sm3071974pdb.94.2014.11.25.21.53.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Nov 2014 21:53:25 -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 2/7] cpufreq-dt: pass 'policy->related_cpus' to of_cpufreq_cooling_register() Date: Wed, 26 Nov 2014 11:22:57 +0530 Message-Id: <4a62588b693c1ab0de09c59da38c03c7ae9c4c06.1416980448.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.180 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 --- 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",