OSDN Git Service

tools/power turbostat: set max_num_cpus equal to the cpumask length
authorPrarit Bhargava <prarit@redhat.com>
Fri, 1 Jun 2018 14:04:28 +0000 (10:04 -0400)
committerLen Brown <len.brown@intel.com>
Sat, 2 Jun 2018 03:12:46 +0000 (23:12 -0400)
commit843c57916dde0e260e500e4ae1a443a7d7fbe962
tree84762eb24cde5bd74d899949eb41719e458b88d3
parent023fe0ac975e4dff592ce90bbd12747dedf7c598
tools/power turbostat: set max_num_cpus equal to the cpumask length

Future fixes will use sysfs files that contain cpumask output.  The code
needs to know the length of the cpumask in order to determine which cpus
are set in a cpumask.  Currently topo.max_cpu_num is the maximum cpu
number.  It can be increased the the maximum value of cpus represented in
cpumasks.

Set max_num_cpus to the length of a cpumask.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c