X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fturbostat.c;h=482ec5e15e904a65880dd2271b91dfeec891ab7c;hb=cd1f3f99b7b25b88245259e0a249765f1f20ecca;hp=f7b0b1d9261f97a0cac044342761f7b6a4004471;hpb=78b1a7a6581c8f85a10a9292eec9237f00b0d851;p=collectd.git diff --git a/src/turbostat.c b/src/turbostat.c index f7b0b1d9..482ec5e1 100644 --- a/src/turbostat.c +++ b/src/turbostat.c @@ -1175,6 +1175,7 @@ probe_cpu() * * This check is valid for both Intel and AMD */ + eax = ebx = ecx = edx = 0; __get_cpuid(0x80000007, &eax, &ebx, &ecx, &edx); if (!(edx & (1 << 8))) { ERROR("No invariant TSC"); @@ -1193,6 +1194,7 @@ probe_cpu() * * This check is valid for both Intel and AMD */ + eax = ebx = ecx = edx = 0; __get_cpuid(0x6, &eax, &ebx, &ecx, &edx); do_dts = eax & (1 << 0); do_ptm = eax & (1 << 6); @@ -1299,7 +1301,7 @@ probe_cpu() } if (do_rapl) { - unsigned long msr; + unsigned long long msr; if (get_msr(0, MSR_RAPL_POWER_UNIT, &msr)) return 0;