From patchwork Fri Nov 28 09:43:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 5402321 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 ED24CBEEA8 for ; Fri, 28 Nov 2014 09:44:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2BFCF2013D for ; Fri, 28 Nov 2014 09:44:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40C9D20142 for ; Fri, 28 Nov 2014 09:44:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751506AbaK1Jol (ORCPT ); Fri, 28 Nov 2014 04:44:41 -0500 Received: from mail-pd0-f169.google.com ([209.85.192.169]:42474 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbaK1Jok (ORCPT ); Fri, 28 Nov 2014 04:44:40 -0500 Received: by mail-pd0-f169.google.com with SMTP id fp1so6323905pdb.14 for ; Fri, 28 Nov 2014 01:44:40 -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=5HOFu8GogVgXRTQLW1BnDD2HRNZzkGRaSYsuguiiLMs=; b=A5eJDZwXYO5q9+fmUkCJacMTJxw80UIevcMo3gKJoMd6JMD//v0z7Zuu/skC9JdJaC E84yBHb1AZxra/OHElcmBDcLg8VRJpK9pW1hE9qOFRNFQDReRWLpKzFzfsgCvmGnqEAl JjoY2+4nzQgahdYwmaZmyOrg8CIQl8sxHAZQkmcLTPDGTM+5uZnKC6SuP20dC0kJI0Fn WUe8VS5t7/feqshz76sTlC/2JLEw7YpDlsyYYN13NGwGjF9MNSpBIbpuiQZROET1GIjr ZxopDdrKCVfPqkvZELwkqKmH9yC4E99p33NtL8s0nqGeyvvqKZOlx85pLQShixCPYbFa XdDQ== X-Gm-Message-State: ALoCoQncqKQrBHtIfxtb/MeV98rYrO+7enswnT5hcbBcIGVtpQhKCdFwDSbafTox1+UonX7SPhQ9 X-Received: by 10.70.87.173 with SMTP id az13mr59542393pdb.134.1417167880216; Fri, 28 Nov 2014 01:44:40 -0800 (PST) Received: from localhost ([122.167.111.40]) by mx.google.com with ESMTPSA id jv6sm8720030pbc.80.2014.11.28.01.44.38 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Nov 2014 01:44:39 -0800 (PST) From: Viresh Kumar To: linux-pm@vger.kernel.org, edubezval@gmail.com Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com, Viresh Kumar , Hongbo Zhang Subject: [PATCH 01/26] thermal: db8500: pass cpu_present_mask to cpufreq_cooling_register() Date: Fri, 28 Nov 2014 15:13:55 +0530 Message-Id: <592c06a7619df6b9fe74d3bb716287902df9a2c1.1417167599.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=unavailable 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 cpufreq_cooling_register() expects mask of all the CPUs where frequency constraint is applicable. This platform has more than one CPU to which these constraints will apply and so passing mask of only CPU0 wouldn't be sufficient. Also, this platform has a single cluster of CPUs and the constraint applies to all CPUs. If CPU0 is hoplugged out then we may face strange BUGs as cpu_cooling framework isn't aware of any siblings sharing clock line. Fix it by passing cpu_present_mask to cpufreq_cooling_register(). Cc: Hongbo Zhang Signed-off-by: Viresh Kumar --- drivers/thermal/db8500_cpufreq_cooling.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/thermal/db8500_cpufreq_cooling.c b/drivers/thermal/db8500_cpufreq_cooling.c index 786d192..374ef1e 100644 --- a/drivers/thermal/db8500_cpufreq_cooling.c +++ b/drivers/thermal/db8500_cpufreq_cooling.c @@ -28,15 +28,12 @@ static int db8500_cpufreq_cooling_probe(struct platform_device *pdev) { struct thermal_cooling_device *cdev; - struct cpumask mask_val; /* make sure cpufreq driver has been initialized */ if (!cpufreq_frequency_get_table(0)) return -EPROBE_DEFER; - cpumask_set_cpu(0, &mask_val); - cdev = cpufreq_cooling_register(&mask_val); - + cdev = cpufreq_cooling_register(cpu_present_mask); if (IS_ERR(cdev)) { dev_err(&pdev->dev, "Failed to register cooling device\n"); return PTR_ERR(cdev);