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: 5390741 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 9688EC11AC for ; Thu, 27 Nov 2014 00:38:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C7018201C7 for ; Thu, 27 Nov 2014 00:38:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 05BD4201B9 for ; Thu, 27 Nov 2014 00:38:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752749AbaK0Ai2 (ORCPT ); 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-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=yBOwuFEACxunbzmf1Dt7bSnRmXRJ+CC8mDUq8afxMgI=; b=cLC0Kyyxlwr/RhORdgWl7gQWOY8aRaHfLLUn96dy8P/FJyn0N7BlS+0uMR74ha0vj3 B6IOjpktqLFK0ZJ6WLCnfZ+SWbs9OLMEf4DmHaf7wF7XRw3brs6mPjHaBwOhMaXbklj0 YaQZI0/yMsuNRHFjogE+OacbD/NCjswuKIEysqpuxwb8UTKxoK+4WUEWE7ADpWH0XRC4 ZEtDoNmiZN9reqaph/sLnNWol9lD84fozBd4m8bJx3VbRUpCCaasZAi3riwRkUfm6bIo iyAUvik9s41ARBCGxU/rAvwGur+OKHfkpNWxitSPGyT8/Wkbuk32KqS1J/Vj3Fc6IcAu D+9Q== X-Gm-Message-State: ALoCoQkZ89gvpsgoQBDjA6eTpaWpLDK+gDtSkMHeRcfOi61PtEcwrmzzKuAPxfCK2kmVVfA2nhZD 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: 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",