• Prarit Bhargava's avatar
    tools/power turbostat: allow running without cpu0 · 7ce7d5de
    Prarit Bhargava authored
    Linux-3.7 added CONFIG_BOOTPARAM_HOTPLUG_CPU0,
    allowing systems to offline cpu0.
    
    But when cpu0 is offline, turbostat will not run:
    
     # turbostat ls
    turbostat: no /dev/cpu/0/msr
    
    This patch replaces the hard-coded use of cpu0 in turbostat
    with the current cpu, allowing it to run without a cpu0.
    
    Fewer cross-calls may also be needed due to use of current cpu,
    though this hard-coding was used only for the --debug preamble.
    Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    7ce7d5de
turbostat.c 79 KB