]> git.baikalelectronics.ru Git - kernel.git/commit
tools/power turbostat: fix segfault on 'no node' machines
authorNathan Ciobanu <nathan.d.ciobanu@linux.intel.com>
Fri, 8 Jun 2018 22:15:12 +0000 (15:15 -0700)
committerLen Brown <len.brown@intel.com>
Wed, 20 Jun 2018 17:55:04 +0000 (13:55 -0400)
commitcb35b4c270055d3dd22beb6d4e1f260de8989bf8
tree6932027a3b20fd4ff1bfabe3656397b0abe7d0dc
parentead895973bd7896cf90477a938c28d5f2bfbdffa
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@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c