[PATCH 4/4] hwmon: (ibmpowernv) pretty print labels

Guenter Roeck linux at roeck-us.net
Wed Apr 8 05:22:12 AEST 2015


Hi Cedric,

On Tue, Apr 07, 2015 at 08:03:46PM +0200, Cedric Le Goater wrote:
> 
> on a P7  :
> 
> 	# ppc64_cpu --info
> 	Core   0:    0*    1*    2*    3* 
> 	Core   1:    4*    5*    6*    7* 
> 	Core   2:    8*    9*   10*   11* 
> 	Core   3:   12*   13*   14*   15* 
> 	Core   4:   16*   17*   18*   19* 
> 	Core   5:   20*   21*   22*   23* 
> 
How would the 'sensors' output look like on that system ?
Wouldn't it be something like the following ?

 	Core 0-7:    +29.0°C  
 	Core 4-11:   +29.0°C  

> 
> > Also, how do you know that the range of CPU IDs is always 8 ?
> 
> This is a shortcut. The code is for the ibmpowernv platform and assumes 
> that we are running on a P8 (8 hardware threads). It would be better to 
> use a "maximum threads per core" variable but I am not sure this is 
> available, as it is a tunable. I will look into it.
> 
Tunable how ? The core code must have some means to detect this number
when it initialized CPU entries, or am I missing something ?

Thanks,
Guenter


More information about the Linuxppc-dev mailing list