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: 5384151 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CBD69C11AC for ; Wed, 26 Nov 2014 05:53:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0F736201EF for ; Wed, 26 Nov 2014 05:53:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 43CFD20160 for ; Wed, 26 Nov 2014 05:53:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752212AbaKZFx0 (ORCPT ); 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=Yg5bg5leJMzV9VUDSyp4ehfqdmsVsicnRkO8aM6TSB4=; b=e1Yc6PK32bJhI+Awk5LlOahzvEBojT/dlMfc6TBmFRBovWI12OUGgxjEEZ2Bhycop4 8omz4aqbiCc6jzH85OrQvhqdUHRAA0UdCgwWoLq+a4tb7tG4nen6HnHhFS8Ycyd3tcst kNMMEaSJDgsDyczg9vQk4ar7zT5y8njdFCJ9PQ0KyzuM4x1J63uOvaQ3TpgaTnAFg2mr 3k8dUzEBV8EV2wrDK9kSOK6Okae0i1e4MoJwyLXQ5vHpiBEBPDn1ZfWtSRZQeKrq05fy CjpM3yVAJnB3UE0JCI8ecf3AzfC/ZLUZ5timICPmgHgVgvYzzJAYKO6q33z3Qcz/WOrp pSRA== X-Gm-Message-State: ALoCoQntCIZkBju3HMhsMG0BCkZbiZrLrKUSAycNZSS4rrb1Cig1+5HMqmcmIDQxnHV+XIADlCYt 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: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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",