lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51F15E42.1060409@ti.com>
Date:	Thu, 25 Jul 2013 13:20:02 -0400
From:	Eduardo Valentin <eduardo.valentin@...com>
To:	Pawel Moll <pawel.moll@....com>
CC:	Eduardo Valentin <eduardo.valentin@...com>,
	Stephen Warren <swarren@...dotorg.org>,
	Mark Rutland <Mark.Rutland@....com>,
	Ian Campbell <ian.campbell@...rix.com>,
	"grant.likely@...aro.org" <grant.likely@...aro.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"rob.herring@...xeda.com" <rob.herring@...xeda.com>,
	Guenter Roeck <linux@...ck-us.net>,
	Durgadoss R <durgadoss.r@...el.com>,
	"Zhang, Rui" <rui.zhang@...el.com>, Wei Ni <wni@...dia.com>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"lm-sensors@...sensors.org" <lm-sensors@...sensors.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: RFC: device thermal limits represented in device tree nodes

On 25-07-2013 12:15, Pawel Moll wrote:
> On Wed, 2013-07-24 at 16:04 +0100, Eduardo Valentin wrote:
>>> 1. As you have pointed out, the thermal limits are related to the
>>> *device being monitored*, not the sensor itself.
>>>
>> Yeah, thinking of it now, this original proposal, it lacks a stronger
>> relationship mapping between monitored and monitoring devices. But it
>> does have it..
>>
>>> 2. Therefore the tree should express relation between those two; a
>>> sensor mode should be connected (via phandle most likely) to the device
>>
>> .. this is done, more or less, by means of the 'type' property (see
>> original RFC binding).
> 
> I'm not sure what do you mean (regarding "type"), but I think I got what
> I wanted with the "monitoring_device" phandles (shouldn't it be
> "_device*s*" then? ;-).

yes. it is supposed to be devices.

> 
>> For example:
>> cpu0: cpu@0 {
>> 	/* ... cpu needed bindings  */
>>
>> 	thermal_zone {
>> 		type = "CPU";
> 
> So what does this exactly mean? What is so special about CPU? What other
> types you've got there? (Am I just lazy not looking at the numerous
> links you provided? ;-)

Hehehe. OK. Type is supposed to describe what your zone is representing.

> 
>> 		monitoring_device = <&sensor@...x
>> 				    &sensor@...y>;
>>
>> 		mask = <0x03>; /* trips writability */
>> 		passive_delay = <250>; /* milliseconds */
>> 		polling_delay = <1000>; /* milliseconds */
>> 		policy = "step_wise";
> 
> The word "policy" doesn't sound to me like a "hardware feature",
> wouldn't you agree?

Agreed. As I mentioned in other email, we can leave this to OS decide
what to use, by default, for instance.

> 
>> 		trips {
>> 			alert@...000{
>> 				temperature = <100000>; /* milliCelsius
>> 				hysteresis = <2000>; /* milliCelsius */
>> 				type = <THERMAL_TRIP_PASSIVE>;
>> 			};
>> 			crit@...000{
>> 				temperature = <125000>; /* milliCelsius
>> 				hysteresis = <2000>; /* milliCelsius */
>> 				type = <THERMAL_TRIP_CRITICAL>;
>> 			};
>> 		};
>> 		bind_params {
>> 			action@0{
>>				cooling_device = "thermal-cpufreq";
> 
> Why is it a string? It seems very Linux-y... (cpufreq) Is there any
> particular reason not to have phandles to the fans that have any impact
> on the zone?
> 

Because fans are not the only way to cool your system, specially those
systems that don't feature fans. Managing the speed of your CPU is one
example of lowering temperature without fans. Managing the load on your
system is another way. These are obviously, virtual concepts. And
because we have physical ways and logical ways to cool the zone, then I
didnt put a phandle to a device there.


>> 				weight = <100>; /* percentage */
> 
> Does this mean: how "successful" will be the particular fan?
> 
>> Another way, as I mentioned in the original RFC, an option would be to
>> have the thermal_zone node not embedded in any device node. But them, we
>> would need to firmly link it to other device nodes, to describe what is
>> monitored and what is used for monitoring. 
> 
> You mean the zone nodes would live at the top level of the tree? To my
> mind the root represents the device (the board, whatever you call it),
> which, I guess, may be what you want, if the zone "covers" the whole
> device? (as in: one fan and one sensor somewhere in the box and the only
> thing you may do is to check the ambient temperature and start the fan
> if it's to high)

Yes, for cases that we want to map zones at board level, they could be
not embedded to a specific device node.

> 
>> With the above I believe we could have dts(i) files describing only
>> thermal, for instance.
> 
> You can include a dtsi inside the device node, no problem with that:
> 
> /dts-v1/;
>         
> / {     
>         smb {                   
>                 compatible = "simple-bus";
> 
>                 /include/ "vexpress-v2m-rs1.dtsi"
>         };      
> };     

OK. got your point. What I was trying to highlight is that we could have
zones not inside device nodes, then we could write them in a thermal
dtsi. And in that case, you probably dont want to include the complete
file inside a device node.

> 
> Pawel
> 
> 
> 
> 


-- 
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin


Download attachment "signature.asc" of type "application/pgp-signature" (296 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ