From patchwork Thu Dec 4 04:11:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41888 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CF30D25E88 for ; Thu, 4 Dec 2014 04:13:11 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id q1sf96998lam.2 for ; Wed, 03 Dec 2014 20:13:10 -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=OFtNtCVoS9xZr4ufGhlQS1BXGSN/lpLvVlF9ZRLqSpU=; b=N+d4w+K7o8bFcTGoSgpBSujYSdtEx10kdU+1vAjkr8TYra3Porbz6xML5LjuTRSYu7 u+ddV2jAOV8YnEC/ygemknZOpa90a37Q9j6RILB3JcUwh0RACbQiZkZCy2du4fD6pTXu diFZHLBmIMnZdiGyTNNX3c5SBbUklh1G2Vl/b1W5+a+nopAFp8x09In5rUzs+9NCqQo7 Jxy31DP0XVSExaSUmcmT5m7qBDh/qTbgEbozTQBECCKAiGRSo1XN0EWptKAcVOlhwMi4 9SCuPycjKD07pZqXwlH7VfNgLxa+IlXhhZM2tJAfMuCv4D1GbfL4atqLPIM3fzVS4QlW Jcag== X-Gm-Message-State: ALoCoQnAEs7JEyKzLUlFPj1Tue9DgYSdvHyTawE8soVX79nPJeNwDsNkPiMfbChR536/KRt/YNND X-Received: by 10.194.133.39 with SMTP id oz7mr1790944wjb.3.1417666390837; Wed, 03 Dec 2014 20:13:10 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.4 with SMTP id m4ls235494laj.6.gmail; Wed, 03 Dec 2014 20:13:10 -0800 (PST) X-Received: by 10.152.120.73 with SMTP id la9mr7331041lab.23.1417666390194; Wed, 03 Dec 2014 20:13:10 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id a5si2985386lab.88.2014.12.03.20.13.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Dec 2014 20:13:10 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id w7so13391486lbi.19 for ; Wed, 03 Dec 2014 20:13:10 -0800 (PST) X-Received: by 10.112.189.10 with SMTP id ge10mr7116340lbc.23.1417666390118; Wed, 03 Dec 2014 20:13:10 -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 ew9csp781019lbc; Wed, 3 Dec 2014 20:13:09 -0800 (PST) X-Received: by 10.66.119.175 with SMTP id kv15mr15405983pab.30.1417666387504; Wed, 03 Dec 2014 20:13:07 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id df1si18139882pdb.237.2014.12.03.20.13.06 for ; Wed, 03 Dec 2014 20:13:07 -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 S1752947AbaLDEND (ORCPT + 12 others); Wed, 3 Dec 2014 23:13:03 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:42476 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752938AbaLDENB (ORCPT ); Wed, 3 Dec 2014 23:13:01 -0500 Received: by mail-pa0-f44.google.com with SMTP id et14so17152089pad.31 for ; Wed, 03 Dec 2014 20:13:01 -0800 (PST) X-Received: by 10.70.37.4 with SMTP id u4mr1631545pdj.3.1417666381435; Wed, 03 Dec 2014 20:13:01 -0800 (PST) Received: from localhost ([122.166.92.172]) by mx.google.com with ESMTPSA id qn1sm24542672pdb.42.2014.12.03.20.12.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 03 Dec 2014 20:13:00 -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 , Chanwoo Choi , Kyungmin Park , Lukasz Majewski Subject: [PATCH V2 04/26] thermal: exynos: pass cpu_present_mask to cpufreq_cooling_register() Date: Thu, 4 Dec 2014 09:41:46 +0530 Message-Id: <3cdb64044ce698b11beb0bb2f9a2c9f1ad100053.1417664938.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.217.174 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: 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 50a1f17..6dc3815 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])) { ret = PTR_ERR(th_zone->cool_dev[th_zone->cool_dev_size]); if (ret != -EPROBE_DEFER)