Linux/linux 42dd452tools/power/x86/turbostat turbostat.c

tools/power turbostat: fix segfault on 'no node' machines

Running turbostat on machines that don't expose nodes
in sysfs (no /sys/bus/node) causes a segfault or a -nan
value diesplayed in the log. This is caused by
physical_node_id being reported as -1 and logical_node_id
being calculated as a negative number resulting in the new
GET_THREAD/GET_CORE returning an incorrect address.

Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu at linux.intel.com>
Signed-off-by: Len Brown <len.brown at intel.com>
DeltaFile
+13-0tools/power/x86/turbostat/turbostat.c
+13-01 files

UnifiedSplitRaw