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: 41668 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B06B5244C2 for ; Fri, 28 Nov 2014 09:44:46 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id n15sf3879380lbi.8 for ; Fri, 28 Nov 2014 01:44:45 -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=1+X0tpOhIeGuZkmlz/NdiTE0vqR4fM8/yC/CTZYWdBs=; b=c8afGRapEoAlviwQU67HJtoCJhyVqy/WkMRYAxu2SY2ORPchc/Gpk2uoVPZgK5K7VU gvqtqoESb/zuApLg+WiFDYa0mORjbFIEQdQpA0XJE3kxEjtGNcV+T+JBiVATL538irqc nVuLSndACzacgMGjHr1nlJ7MhTYiOxAP6N9xWWmpIZ0C2c8rI8MqDrkjZZwBhXKMwEeo yL7EoSFPHL14gh4iizoG5x/KupxtguIDZWP4tF3Kl7OEsibpwkfbBaoEpydRuYAGQPkc 6UkBKtNxDDtyddE3ur53Qpa9+ymJlHrhMh4MOQ7MhbTIQQl2SkyIgNU8b32ydZVXQzmr bDaA== X-Gm-Message-State: ALoCoQnLqoxWuoA4x09LDfAYv971EDII/qgDUccJKJp1aUvaYmftBypHJUepZtojucbuKlTOdFH4 X-Received: by 10.112.142.36 with SMTP id rt4mr11848711lbb.3.1417167885143; Fri, 28 Nov 2014 01:44:45 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.227 with SMTP id v3ls973125lav.91.gmail; Fri, 28 Nov 2014 01:44:44 -0800 (PST) X-Received: by 10.153.6.33 with SMTP id cr1mr43578044lad.63.1417167884776; Fri, 28 Nov 2014 01:44:44 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id h4si9473195lbd.53.2014.11.28.01.44.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Nov 2014 01:44:44 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id q1so485056lam.19 for ; Fri, 28 Nov 2014 01:44:44 -0800 (PST) X-Received: by 10.112.189.10 with SMTP id ge10mr42372852lbc.23.1417167884627; Fri, 28 Nov 2014 01:44:44 -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 ew9csp60343lbc; Fri, 28 Nov 2014 01:44:43 -0800 (PST) X-Received: by 10.70.129.104 with SMTP id nv8mr70251847pdb.81.1417167882973; Fri, 28 Nov 2014 01:44:42 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vj10si15336419pbc.138.2014.11.28.01.44.42 for ; Fri, 28 Nov 2014 01:44:42 -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 S1751506AbaK1Jol (ORCPT + 12 others); 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-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: 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.215.46 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: , 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);