From patchwork Fri Nov 28 09:43:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41669 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DA2A5244C2 for ; Fri, 28 Nov 2014 09:44:49 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf4041058wib.10 for ; Fri, 28 Nov 2014 01:44:49 -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=oOLUZmZkFMidljOwbl9c1dQv9BW8gIIGqWzvuUWSPGY=; b=ggVVOFUEZRxvGaPHteXIr2cSC4htJ9wkVwPkeet7np0WhqebehR5bENd/3SKrOuWIl dR1vavZlaTBBhsCKn+D1NlIxJ/U53O0+IewbpyOFD3iAvArEXOVshKeakG1UvNc5pCAq a0HKbqgAC3ff3LhNv60blM0kHJACsUtg4uenXX+RnO68z3r5sFQ6O8D/KmJmPoYy1lVj 83hTXaQ6yhiX9sOiQnhU+5mBJ5ovAJcsnThKBd6dA0HQN5B+b4X6SIH50NCr8xWHYupZ xIyMw9WM6TKIRvxRpfhTEfJ0/0lo6bbRhQvP60VoAc9XuNq65NSMC9KmOVR6/g8UOMVu DSTw== X-Gm-Message-State: ALoCoQmm6c0mgC0z/4jxH5VdcJsH2cezAe1eubcsh4VkuGEo/XfROiZxKL/FV3/SoEa1wKV3bfxF X-Received: by 10.112.55.10 with SMTP id n10mr198898lbp.14.1417167889112; Fri, 28 Nov 2014 01:44:49 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.45.33 with SMTP id j1ls357498lam.59.gmail; Fri, 28 Nov 2014 01:44:48 -0800 (PST) X-Received: by 10.152.7.71 with SMTP id h7mr41918964laa.68.1417167888878; Fri, 28 Nov 2014 01:44:48 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id p9si9496994lal.21.2014.11.28.01.44.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Nov 2014 01:44:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gm9so5250908lab.40 for ; Fri, 28 Nov 2014 01:44:48 -0800 (PST) X-Received: by 10.112.14.69 with SMTP id n5mr42908795lbc.34.1417167888453; Fri, 28 Nov 2014 01:44:48 -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 ew9csp60352lbc; Fri, 28 Nov 2014 01:44:47 -0800 (PST) X-Received: by 10.68.235.70 with SMTP id uk6mr70564417pbc.152.1417167886884; Fri, 28 Nov 2014 01:44:46 -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.46 for ; Fri, 28 Nov 2014 01:44:46 -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 S1751573AbaK1Jop (ORCPT + 12 others); Fri, 28 Nov 2014 04:44:45 -0500 Received: from mail-pd0-f178.google.com ([209.85.192.178]:54873 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbaK1Joo (ORCPT ); Fri, 28 Nov 2014 04:44:44 -0500 Received: by mail-pd0-f178.google.com with SMTP id g10so6458908pdj.9 for ; Fri, 28 Nov 2014 01:44:44 -0800 (PST) X-Received: by 10.70.35.104 with SMTP id g8mr38107364pdj.122.1417167884405; Fri, 28 Nov 2014 01:44:44 -0800 (PST) Received: from localhost ([122.167.111.40]) by mx.google.com with ESMTPSA id cl11sm9352103pdb.94.2014.11.28.01.44.43 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Nov 2014 01:44:43 -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 , Shawn Guo Subject: [PATCH 02/26] thermal: imx: pass cpu_present_mask to cpufreq_cooling_register() Date: Fri, 28 Nov 2014 15:13:56 +0530 Message-Id: <1586ae144b782ab964debfd3936a4ae63d5109e1.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.53 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: Shawn Guo Signed-off-by: Viresh Kumar --- drivers/thermal/imx_thermal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 5a1f107..1eefc6d 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -454,7 +454,6 @@ static int imx_thermal_probe(struct platform_device *pdev) const struct of_device_id *of_id = of_match_device(of_imx_thermal_match, &pdev->dev); struct imx_thermal_data *data; - struct cpumask clip_cpus; struct regmap *map; int measure_freq; int ret; @@ -516,8 +515,7 @@ static int imx_thermal_probe(struct platform_device *pdev) regmap_write(map, MISC0 + REG_SET, MISC0_REFTOP_SELBIASOFF); regmap_write(map, TEMPSENSE0 + REG_SET, TEMPSENSE0_POWER_DOWN); - cpumask_set_cpu(0, &clip_cpus); - data->cdev = cpufreq_cooling_register(&clip_cpus); + data->cdev = cpufreq_cooling_register(cpu_present_mask); if (IS_ERR(data->cdev)) { ret = PTR_ERR(data->cdev); dev_err(&pdev->dev,