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: 41670 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5F659244C2 for ; Fri, 28 Nov 2014 09:44:54 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id c13sf4039195eek.6 for ; Fri, 28 Nov 2014 01:44:53 -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=1JPLlcq1pSHoZpJlA4TtUCOY9vDdovRJBRN9uN2CDL8=; b=EfaELctZlt1SFR0qr8gS4oJdaDr1dARRv7zar7C9thkdb1hnAnpIC+xv64g9IbWUja L1oWwK8OghgAeixGYuUVCml2r6MctJnKhsFNPXmM7nxu2Sh6/a6yEsBUbIDpl1RWaJRS Hz5paf1suJ6wF0cd8DHdHbRrEomsq1f4MaSaZApvZBv5yzhDqsZebuyrQzFyRKsDdxyG UMmYv6YRwHwIMc974yGD6Zs3Ap6N8/S+3xkHwXMs532DaD2mbb4bktQyN5c+ZpMjXTiX HZqAeBuLIpvUUoSOw9zBoZlNxfYaa/FEfJa41Olu4IsJGQ+4Gb2NEc1T1QPCTEW4mY45 yvdA== X-Gm-Message-State: ALoCoQk6O+9EFF8tfT6ODUO8y6VPdjFzHseIyPw7etcHzY1AM887mkpA/kmfDNc2pVqoD3XZgr8s X-Received: by 10.180.108.101 with SMTP id hj5mr9738304wib.3.1417167893379; Fri, 28 Nov 2014 01:44:53 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.37 with SMTP id g5ls152383lah.102.gmail; Fri, 28 Nov 2014 01:44:52 -0800 (PST) X-Received: by 10.152.42.172 with SMTP id p12mr43023231lal.11.1417167892836; Fri, 28 Nov 2014 01:44:52 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id rw6si9189800lbb.42.2014.11.28.01.44.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Nov 2014 01:44:52 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id s18so5435873lam.29 for ; Fri, 28 Nov 2014 01:44:52 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr42327543lbc.66.1417167892672; Fri, 28 Nov 2014 01:44:52 -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 ew9csp60365lbc; Fri, 28 Nov 2014 01:44:51 -0800 (PST) X-Received: by 10.68.204.8 with SMTP id ku8mr70698000pbc.103.1417167891099; Fri, 28 Nov 2014 01:44:51 -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.50 for ; Fri, 28 Nov 2014 01:44:51 -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 S1751646AbaK1Jot (ORCPT + 12 others); 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-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: 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.42 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 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");