diff options
author | Jacob Shin <jacob.shin@amd.com> | 2013-07-02 08:47:00 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-07-02 08:47:00 +0200 |
commit | 6b104d91b81ac460a0a862f02c7cbeff82e14430 (patch) | |
tree | bcc611f2189fd5190729554a6a630ae9a7c264bf /tools | |
parent | ec7e270db8639db880573f029881b9bee31d33d9 (diff) | |
download | xen-6b104d91b81ac460a0a862f02c7cbeff82e14430.tar.gz xen-6b104d91b81ac460a0a862f02c7cbeff82e14430.tar.bz2 xen-6b104d91b81ac460a0a862f02c7cbeff82e14430.zip |
cpufreq, xenpm: fix cpufreq and xenpm mismatch
Currently cpufreq and xenpm are out of sync. Fix cpufreq reporting of
if turbo mode is enabled or not. Fix xenpm to not decode for tristate,
but a boolean.
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/misc/xenpm.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/tools/misc/xenpm.c b/tools/misc/xenpm.c index b5f13830d2..2e57f1fcaf 100644 --- a/tools/misc/xenpm.c +++ b/tools/misc/xenpm.c @@ -31,10 +31,6 @@ #define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) -#define CPUFREQ_TURBO_DISABLED -1 -#define CPUFREQ_TURBO_UNSUPPORTED 0 -#define CPUFREQ_TURBO_ENABLED 1 - static xc_interface *xc_handle; static unsigned int max_cpu_nr; @@ -699,13 +695,9 @@ static void print_cpufreq_para(int cpuid, struct xc_get_cpufreq_para *p_cpufreq) p_cpufreq->scaling_max_freq, p_cpufreq->scaling_min_freq, p_cpufreq->scaling_cur_freq); - if (p_cpufreq->turbo_enabled != CPUFREQ_TURBO_UNSUPPORTED) { - printf("turbo mode : "); - if (p_cpufreq->turbo_enabled == CPUFREQ_TURBO_ENABLED) - printf("enabled\n"); - else - printf("disabled\n"); - } + + printf("turbo mode : %s\n", + p_cpufreq->turbo_enabled ? "enabled" : "disabled or n/a"); printf("\n"); } |