Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp621005ybl; Fri, 6 Dec 2019 03:35:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzEwWPNTR35Bk3JOL8s795v33jpInSmo8bY7811KJZBdwlpQ1NvtzXOE+uELaxutgZxasPx X-Received: by 2002:aca:c74e:: with SMTP id x75mr12193221oif.140.1575632101473; Fri, 06 Dec 2019 03:35:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575632101; cv=none; d=google.com; s=arc-20160816; b=mRc6eIA2l/K72V2gcIt+C5Gew9x0adq33GFvfvtKk9qUJz0qE6LlAT7KySX4WcZJ5B ou4qTmbOOgjnewdj0I5QvomRuMf4DUKhyQ5tNG+GRog9KP+K01xq53/gh6XjA4nu3mTW kTlm6Wp1OeG/vj8+clEOVqc6PlpDVoygoy7CZdF0Pa1EkuPdYiMXEk84RUgMoKS8TEjJ nx0l33RjMbWN9PLOSXxptipJ7OLuXyLDJk/4OoLJfwz2oc+pOX4aMLIwC0yvm/bxlwG2 mg9c7MNOs8AGapi/TVQmVILkc3LepLhMQafCG/RRn1GcX8Kavf48oTF8fToM8VH3BMkH ttJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:references :in-reply-to:message-id:date:subject:cc:to:from; bh=ro//j87fpvPb8Cyoy33O5NGJzoicYsM9ys3HnPuyHKQ=; b=SBHMr2aIqJguW7zHqiIIsI9firy4YGvgZsi5TzXz82w6+ea3frkpf513zg3iDeRmLt yZ4By/weOXHNU/K+rfe67cvueUXYJz6EThADt4e5cseBRJwh7ojCssOSgUpLW0IuKiOC aauqe2OUfoIj0ePN1T1fqVMy+cFaTmpUvAKaoL/C3FICmZr9ig8u185W6jmne//ZDFER aPvpcylsf48QS2wlBRbs33IyBSbGpeFRrzu3b+UnmDDTBWeq6bN48xfC+KakVlI5qFlD oqXHn57hj9UbQjGzOgFQ+Y7979aDKi0vSprtFGfnLTItJC2hR+aEpr+60cCGrMWe9aEG KwKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si3479771oic.153.2019.12.06.03.34.48; Fri, 06 Dec 2019 03:35:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726246AbfLFLdw (ORCPT + 99 others); Fri, 6 Dec 2019 06:33:52 -0500 Received: from comms.puri.sm ([159.203.221.185]:46516 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726088AbfLFLdw (ORCPT ); Fri, 6 Dec 2019 06:33:52 -0500 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 360A0DFE25; Fri, 6 Dec 2019 03:33:51 -0800 (PST) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8GWJpsWM_QVg; Fri, 6 Dec 2019 03:33:50 -0800 (PST) From: Martin Kepplinger To: daniel.lezcano@linaro.org, edubezval@gmail.com, rui.zhang@intel.com Cc: rjw@rjwysocki.net, linux-pm@vger.kernel.org, viresh.kumar@linaro.org, amit.kucheria@linaro.org, linux-kernel@vger.kernel.org, Martin Kepplinger Subject: Re: [PATCH V4 4/4] thermal/drivers/cpu_cooling: Rename to cpufreq_cooling Date: Fri, 6 Dec 2019 12:33:15 +0100 Message-Id: <20191206113315.18954-1-martin.kepplinger@puri.sm> In-Reply-To: <20191204153930.9128-4-daniel.lezcano@linaro.org> References: <20191204153930.9128-4-daniel.lezcano@linaro.org> Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I tested this on the librem5-devkit and see the cooling devices in sysfs. I configure ARM_PSCI_CPUIDLE, not ARM_CPUIDLE and add the patch below in register the cooling device there. "psci_idle" is listed as the cpuidle_driver. That's what I'm running, in case you want to see it all: https://source.puri.sm/martin.kepplinger/linux-next/commits/next-20191205/librem5_cpuidle_mainline_atf so I add a trip temperature description like this: https://source.puri.sm/martin.kepplinger/linux-next/commit/361f49f93ae2c477fd012790831cabd0ed976660 When I let the SoC heat up, cpuidle cooling won't kick it. In sysfs: catting the relevant files in /sys/class/thermal after heating up, if that makes sense: 87000 85000 85000 thermal-cpufreq-0 1 thermal-idle-0 0 thermal-idle-1 0 thermal-idle-2 0 thermal-idle-3 0 with ARM_CPUIDLE instead of ARM_PSCI_CPUIDLE (and registering the cooling dev during cpuidle-arm.c init) I won't have a cpuidle driver and thus no cpu-sleep state at all. Can you see where the problem here lies? thanks! martin --- drivers/cpuidle/cpuidle-psci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c index f3c1a2396f98..de6e7f444a66 100644 --- a/drivers/cpuidle/cpuidle-psci.c +++ b/drivers/cpuidle/cpuidle-psci.c @@ -8,6 +8,7 @@ #define pr_fmt(fmt) "CPUidle PSCI: " fmt +#include #include #include #include @@ -195,6 +196,8 @@ static int __init psci_idle_init_cpu(int cpu) if (ret) goto out_kfree_drv; + cpuidle_cooling_register(drv); + return 0; out_kfree_drv: -- 2.20.1