From patchwork Fri Nov 28 09:43:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 5402341 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 D1D1EBEEA8 for ; Fri, 28 Nov 2014 09:44:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3AD7C20142 for ; Fri, 28 Nov 2014 09:44:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5954D2013D for ; Fri, 28 Nov 2014 09:44:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751646AbaK1Jot (ORCPT ); Fri, 28 Nov 2014 04:44:49 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:53882 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751586AbaK1Jos (ORCPT ); Fri, 28 Nov 2014 04:44:48 -0500 Received: by mail-pa0-f50.google.com with SMTP id bj1so6506643pad.23 for ; Fri, 28 Nov 2014 01:44:48 -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=11a4YaXNShUU6oS5v0NVIcEun4c1Hu++4oDQHKTA0RI=; b=hlCw3Wrx9Pu4yP6RV97k9pYqLi+tHO0CYHbk21kst36NKt3loOJSrV5C61YnazMh2S fNSaRvQ5sJt7bhtfhGSMJP3ria6Kpzo8HbG++dpgOuXOQDs2kMKug/HTUraAPXre7+TQ OXCrHoNUXUzt1H3ZxeR918ArU6r9+2n843i+k1omSYHJYtEqumAj2MfIdKybfQiLY1hF 6B0hqvKuY/ANZ9nq76n9afkF7IHXclueP1JUPnNW4iYz4iASBn25GEFNBcbVkjJM7emM SFbcpS6bgF5LJ0mMWec4JW8eWbDSgWPSANfqsJ9jLp/m2tJquV4607dv9o+JB+B8fxSC 30xA== X-Gm-Message-State: ALoCoQloHMgE3LyAMypRlIF3nYg/FJkzvOgs/aG9u8CyRetWKTUs1H/ZhqO8HejRKqW77OByY2Lg X-Received: by 10.68.138.202 with SMTP id qs10mr48983166pbb.83.1417167888308; Fri, 28 Nov 2014 01:44:48 -0800 (PST) Received: from localhost ([122.167.111.40]) by mx.google.com with ESMTPSA id im5sm9355217pbb.43.2014.11.28.01.44.47 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Nov 2014 01:44:47 -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 , Chanwoo Choi , Kyungmin Park , Amit Daniel Kachhap , Lukasz Majewski Subject: [PATCH 03/26] thermal: exynos: pass cpu_present_mask to cpufreq_cooling_register() Date: Fri, 28 Nov 2014 15:13:57 +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: 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: Chanwoo Choi Cc: Kyungmin Park Cc: Amit Daniel Kachhap Cc: Lukasz Majewski Signed-off-by: Viresh Kumar --- drivers/thermal/samsung/exynos_thermal_common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/thermal/samsung/exynos_thermal_common.c b/drivers/thermal/samsung/exynos_thermal_common.c index 3f5ad25..bf39212 100644 --- a/drivers/thermal/samsung/exynos_thermal_common.c +++ b/drivers/thermal/samsung/exynos_thermal_common.c @@ -347,7 +347,6 @@ void exynos_report_trigger(struct thermal_sensor_conf *conf) int exynos_register_thermal(struct thermal_sensor_conf *sensor_conf) { int ret; - struct cpumask mask_val; struct exynos_thermal_zone *th_zone; if (!sensor_conf || !sensor_conf->read_temperature) { @@ -367,9 +366,8 @@ int exynos_register_thermal(struct thermal_sensor_conf *sensor_conf) * sensor */ if (sensor_conf->cooling_data.freq_clip_count > 0) { - cpumask_set_cpu(0, &mask_val); th_zone->cool_dev[th_zone->cool_dev_size] = - cpufreq_cooling_register(&mask_val); + cpufreq_cooling_register(cpu_present_mask); if (IS_ERR(th_zone->cool_dev[th_zone->cool_dev_size])) { dev_err(sensor_conf->dev, "Failed to register cpufreq cooling device\n");