Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1009775imu; Fri, 11 Jan 2019 13:12:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN5YSaeT3cpBoI++dEnCUpMolh5s8Kub6s2BSRPGAEcb3YShKEB1MaQA4E2B7uGIPXJu6yyv X-Received: by 2002:a65:4381:: with SMTP id m1mr14556840pgp.358.1547241174192; Fri, 11 Jan 2019 13:12:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547241174; cv=none; d=google.com; s=arc-20160816; b=NbxgH9xcyQWpnXDIz+xc407X/7HiKLiEEbHTmREXqZpD8uyrbqYekgXe/un8pBreqt rFnG2dzfvIKjFCIPdGQUz3QFdPLQt2TFE8E2aSKaqcJiXYSoZ6nYUr3t3LKe/Vds7iYX AJAmjlOPPDtV9A7Q4HcArbeChF2w1fxqRgiMRfqbEmUYedRPZaHEG528JgoxKLAdQosy 6VJuGKZ2ysjhoporjR84H7WfZJLuXEh39mU88zGdOE4exJNjyboCZ64YczC51A2WoLUC 5Z79sv6ax1ph64JbEmARkuKeCGD76F0Gb9Boo6fZL5BGUoCuvK1lwSlATQ1jknTRZE4j c/NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=T/UuOZQz1q2LZujBJ1f3FAd7NotydTH3SwAts21JKYc=; b=vBD4yEwQdZoPu1cLaBhKqIsjwQHVyLX3yk+Vs0KFwoeWOLs+mBXzkbOJFFlwAAWjus XSdCuuGM74gAuOleOfUVHWr0j8jbc675nTFSETAgzGkZgshwD2cCGd7JFMvobEjDMWVt q1rXudKoO/w/HC4bHgKj2a37Fj4xmvlM7rnEVunTIcMJq1FiZGkZxiwDZcc9QXcxmJdu p1u49B+BXZVcleFr6NzoQFuLlXlNIA7Q8JT4iQxOnkUBxm3T8vXS4UZzhdnv6kf7vfva mhhic3hfqdYwn0Awz6v3xQGwFPJ4UaPMRm6RcSyEfxK7WUEeLXOjMTAd8r8H7X0lO3wO Vouw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lV3cO032; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 41si9767916plf.347.2019.01.11.13.12.39; Fri, 11 Jan 2019 13:12:54 -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; dkim=pass header.i=@chromium.org header.s=google header.b=lV3cO032; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390541AbfAKT6Q (ORCPT + 99 others); Fri, 11 Jan 2019 14:58:16 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:36732 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388913AbfAKT6Q (ORCPT ); Fri, 11 Jan 2019 14:58:16 -0500 Received: by mail-pl1-f194.google.com with SMTP id g9so7214123plo.3 for ; Fri, 11 Jan 2019 11:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=T/UuOZQz1q2LZujBJ1f3FAd7NotydTH3SwAts21JKYc=; b=lV3cO032VUNPUo/EjCMMIS9JaEzW+vNbeZFQu8bXMYsxsw5Xfn6gd2Q6ColyCgVUW2 gPkU0vyabNuISdiMN+UCdefu8IpvWtPC8/XvXi49X+QUfEgo8xAAE4SaXBTOQE72dcE4 iIDgZDuu8uUazM7yH0Q1Pj7tQU0z428wNI6gg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=T/UuOZQz1q2LZujBJ1f3FAd7NotydTH3SwAts21JKYc=; b=Rug3dHXtiucigZFLMjG63irRG9gaiBbDDSMKoozJ75yO2m6ntVtTYV7WqMCfCgwxT1 knfHM630pn6nRtKEBuw4f9Pn7u6kiu/cjCh94i21kL9Z9UkgLhiJQJTt94mke8ll9ONd ONv80YrFXRFV+bWUETiHSXDo645wos0AIue6mPz50T5Ze5cCME8mpTpP7UEBnaP1ksjE IWRb8sRc5Ih2e9Q46CVthkqz33VQWRn/uXaCXMSXRjWQb/AO8nLNAN8Xpv4Un+9RdbV+ FZ0uwj7F8rN3Mh0l/scmy8Hg1oi/dZSIh2YdLRvkq6ZX1VrfO6uEsWoc1rUzHBdrphyX O0/Q== X-Gm-Message-State: AJcUukfL2uUtnSJJLgQo7jSvzBMlL89gUSNncTiwC2O91XYRXK6BosVU ZHNUJm1O/7yTKJPF4bmgjPht6Q== X-Received: by 2002:a17:902:112c:: with SMTP id d41mr15418954pla.144.1547236695107; Fri, 11 Jan 2019 11:58:15 -0800 (PST) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id w10sm91058880pgi.81.2019.01.11.11.58.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 11:58:13 -0800 (PST) Date: Fri, 11 Jan 2019 11:58:13 -0800 From: Matthias Kaehlcke To: Viresh Kumar Cc: Amit Kucheria , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, David Brown , Rob Herring , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Subject: Re: [PATCH v1 7/7] arm64: dts: sdm845: wireup the thermal trip points to cpufreq Message-ID: <20190111195813.GF261387@google.com> References: <6c5b26e65be18222587724e066fc2e39b9f60397.1547078153.git.amit.kucheria@linaro.org> <20190110022217.GX261387@google.com> <20190110062359.aea3tic5aw3iuocr@vireshk-i7> <20190110184241.GY261387@google.com> <20190111034653.6dstox4c6hpjum4f@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190111034653.6dstox4c6hpjum4f@vireshk-i7> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 11, 2019 at 09:16:53AM +0530, Viresh Kumar wrote: > On 10-01-19, 10:42, Matthias Kaehlcke wrote: > > Thanks for the pointer, there's always something new to learn! > > > > Ok, so the policy CPU and hence the CPU registered as cooling > > device may vary. I understand that this requires to list all possible > > cooling devices, > > I won't say that I changed DT because of a design issue with kernel, > rather the DT shall be complete by itself and that's why that change > was made. fair enough > And then we can have more things going on. For example with cpuidle > cooling, we can individually control each CPU (and force idle on that) > even if all CPUs are part of the same freq-domain. Each CPU shall > expose its capabilities. Just to gain a better understanding: is cpuidle cooling already available for arm64 (or is there a patch set)? I came across the relatively new idle injecting framework but it seems currently the only user is the Intel powerclamp driver. > > even though only one will be active at any given > > time. However I wonder if we could change this: > > I won't say it that way. I see it as all the CPUs are active during a > cooling state, i.e. they are all participating. agreed, I was referring to the CPU cooling device, which (without cpuidle injection) could be considered a single device per freq domain. > > For device tree based platform the above implies that cooling maps > > must include a list of all possible cooling devices of a frequency > > domain, even though only one of them will exist at any given time. > > > > For example: > > > > cooling-maps { > > map0 { > > trip = <&cpu_alert0>; > > cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, > > <&CPU1 THERMAL_NO_LIMIT 4>, > > <&CPU2 THERMAL_NO_LIMIT 4>, > > <&CPU3 THERMAL_NO_LIMIT 4>; > > }; > > map1 { > > trip = <&cpu_crit0>; > > cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > > This is the right thing to do hardware description wise, no matter > what the kernel does. Not sure I would call it a hardware description. I'd say we pretend the thermal configuration is a hardware description so the DT folks don't yell at us ;-) IMO a CPU cooling device is an abstraction, I think there is no such IP block on most systems. It seems with cpuidle injection CPUs can perform cooling actions individually, with that I agree that representing them as individual cooling devices in the DT makes sense. Without that a cooling device per freq domain would seem a resonable abstraction. One of the reasons I dislike the above list of cooling devices is that it is repeated for different thermal-zone/cooling-maps, but I guess we have to live with that, would be nice if the DT would allow to do something like this: thermal-zones { cooling_maps_fd0 : cooling-maps { map0 { trip = <&cpu_alert0>; cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, <&CPU1 THERMAL_NO_LIMIT 4>, <&CPU2 THERMAL_NO_LIMIT 4>, <&CPU3 THERMAL_NO_LIMIT 4>; }; map1 { trip = <&cpu_crit0>; cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; cpu0-thermal { ... cooling-maps = @cooling_maps_fd0; ... }; cpu1-thermal { ... cooling-maps = @cooling_maps_fd0; ... }; ... }; Cheers Matthias