]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
x86/VPMU: return correct fixed PMC count
authorBrendan Gregg <bgregg@netflix.com>
Wed, 25 Nov 2015 10:12:55 +0000 (11:12 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Nov 2015 10:12:55 +0000 (11:12 +0100)
Fixes a register typo.

Signed-off-by: Brendan Gregg <bgregg@netflix.com>
Reviewed-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/vpmu_intel.c

index 12f80aeb7016efddea332d404f7531c99108f016..d5ea7fe2a35ca5112dd9542a32b6c62063f2df9c 100644 (file)
@@ -166,10 +166,9 @@ static int core2_get_arch_pmc_count(void)
  */
 static int core2_get_fixed_pmc_count(void)
 {
-    u32 eax;
+    u32 edx = cpuid_edx(0xa);
 
-    eax = cpuid_eax(0xa);
-    return MASK_EXTR(eax, PMU_FIXED_NR_MASK);
+    return MASK_EXTR(edx, PMU_FIXED_NR_MASK);
 }
 
 /* edx bits 5-12: Bit width of fixed-function performance counters  */