From patchwork Thu Dec 4 04:11:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41886 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3976325E88 for ; Thu, 4 Dec 2014 04:13:07 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id d49sf10494192eek.8 for ; Wed, 03 Dec 2014 20:13:06 -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=fiUGHn7SHUfe7+KnXvBMTjNMlqGwja6oFqZyE7CdfRA=; b=d3kuyx/e0gF6KkLYA6x/uzw7DyO3a1hEeoFr8n++ayv8gu5idYJ5tTUIdpEpQI2GKQ qaWtVZJdTCqWASH3xysCj+Tde+KjeFT4lhAQyxUyZwrfwG9WjN1wIz0DqmnXaTEy1TIN hqrgVaXBipSzK2/vNYYEbSclnTvuHpU0xEd6sRMrjUR3pIpi8OZo62xebJMyFj4EyGIQ nMudo/AspTsgJ4N1Sm81z6fZ6ZvGwxaa5Rv0MAx81wHd0zalfc3jWTh8YLiH/QO0Dfpo hmmf3I5g9V0WKyWLaaYKm4RS8/R7oodtnIhPK1wWZU5FycS1DLSn/As7ww6/QrVLwCKI KZ3Q== X-Gm-Message-State: ALoCoQmt3+OhqP5CVCtJKx6r0OsN4vtEdb4Qn15ozK3V0dVyEJJ4L85713i+WB/DN8qZUDiAwXQx X-Received: by 10.180.94.3 with SMTP id cy3mr2810411wib.7.1417666386482; Wed, 03 Dec 2014 20:13:06 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.5 with SMTP id f5ls228279lah.62.gmail; Wed, 03 Dec 2014 20:13:06 -0800 (PST) X-Received: by 10.152.121.1 with SMTP id lg1mr7230253lab.28.1417666386106; Wed, 03 Dec 2014 20:13:06 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id l2si24657435lbc.48.2014.12.03.20.13.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Dec 2014 20:13:06 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id u10so13166085lbd.20 for ; Wed, 03 Dec 2014 20:13:06 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr7192166laz.71.1417666386026; Wed, 03 Dec 2014 20:13:06 -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 ew9csp781009lbc; Wed, 3 Dec 2014 20:13:05 -0800 (PST) X-Received: by 10.70.43.209 with SMTP id y17mr1623821pdl.2.1417666384357; Wed, 03 Dec 2014 20:13:04 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id by7si41188522pab.179.2014.12.03.20.13.01 for ; Wed, 03 Dec 2014 20:13:04 -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 S1752932AbaLDEM4 (ORCPT + 12 others); Wed, 3 Dec 2014 23:12:56 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:65259 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752872AbaLDEMy (ORCPT ); Wed, 3 Dec 2014 23:12:54 -0500 Received: by mail-pa0-f45.google.com with SMTP id lj1so17188037pab.4 for ; Wed, 03 Dec 2014 20:12:53 -0800 (PST) X-Received: by 10.70.89.237 with SMTP id br13mr15227499pdb.78.1417666373133; Wed, 03 Dec 2014 20:12:53 -0800 (PST) Received: from localhost ([122.166.92.172]) by mx.google.com with ESMTPSA id sp6sm1120165pac.42.2014.12.03.20.12.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 03 Dec 2014 20:12:52 -0800 (PST) From: Viresh Kumar To: linux-pm@vger.kernel.org, edubezval@gmail.com Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com, amit.daniel@samsung.com, javi.merino@arm.com, Viresh Kumar , Hongbo Zhang , Linus Walleij Subject: [PATCH V2 02/26] thermal: db8500: pass cpu_present_mask to cpufreq_cooling_register() Date: Thu, 4 Dec 2014 09:41:44 +0530 Message-Id: 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.217.175 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 Cc: Linus Walleij Signed-off-by: Viresh Kumar Acked-by: Linus Walleij --- 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 1ac7ec6..3cc3dd9 100644 --- a/drivers/thermal/db8500_cpufreq_cooling.c +++ b/drivers/thermal/db8500_cpufreq_cooling.c @@ -27,11 +27,8 @@ static int db8500_cpufreq_cooling_probe(struct platform_device *pdev) { struct thermal_cooling_device *cdev; - struct cpumask mask_val; - - 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);