tools/power turbostat: Allocate correct amount of fd and irq entries
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 22 Apr 2016 08:13:23 +0000 (11:13 +0300)
committerLen Brown <len.brown@intel.com>
Thu, 1 Dec 2016 06:33:16 +0000 (01:33 -0500)
commit01a67adfc5d73d24e999d9cf65b5b8a6687187b8
tree810e3a6680f4cbe8db0c77383af18f352aca14b5
parent3d109de23c93e9196c370fd729fbd7ecf7371701
tools/power turbostat: Allocate correct amount of fd and irq entries

The tool uses topo.max_cpu_num to determine number of entries needed for
fd_percpu[] and irqs_per_cpu[]. For example on a system with 4 CPUs
topo.max_cpu_num is 3 so we get too small array for holding per-CPU items.

Fix this to use right number of entries, which is topo.max_cpu_num + 1.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c