From: Vincent Brillault Date: Fri, 22 Aug 2014 22:46:42 +0000 (+0200) Subject: Turbostat: Remove has_invariant_tsc X-Git-Tag: collectd-5.5.0~24^2~71 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=abbfb4e3663055cd15457a654b54b4a5738f1412;p=collectd.git Turbostat: Remove has_invariant_tsc We refuse to run if it's not true, so let's just assume it is --- diff --git a/src/turbostat.c b/src/turbostat.c index 46f74a74..ca8551a9 100644 --- a/src/turbostat.c +++ b/src/turbostat.c @@ -70,7 +70,6 @@ static unsigned int do_slm_cstates; static unsigned int has_aperf; static unsigned int has_epb; static unsigned int genuine_intel; -static unsigned int has_invariant_tsc; static unsigned int do_nehalem_platform_info; static int do_smi; static unsigned int do_rapl; @@ -1206,9 +1205,7 @@ check_cpuid() * this check is valid for both Intel and AMD */ __get_cpuid(0x80000007, &eax, &ebx, &ecx, &edx); - has_invariant_tsc = edx & (1 << 8); - - if (!has_invariant_tsc) { + if (!(edx & (1 << 8))) { ERROR("No invariant TSC"); return -ERR_NO_INVARIANT_TSC; } @@ -1229,7 +1226,7 @@ check_cpuid() return -ERR_NO_APERF; } - do_nehalem_platform_info = genuine_intel && has_invariant_tsc; + do_nehalem_platform_info = genuine_intel; do_nhm_cstates = genuine_intel; /* all Intel w/ non-stop TSC have NHM counters */ do_smi = do_nhm_cstates; do_snb_cstates = is_snb(family, model);