Skip to content

Commit 8d1acfe

Browse files
xiongzhasean-jc
authored andcommitted
x86: pmu: Remove duplicate code in pmu_init()
There are totally same code in pmu_init() helper, remove the duplicate code. Reviewed-by: Jim Mattson <jmattson@google.com> Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com> Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Reviewed-by: Mingwei Zhang <mizhang@google.com> Link: https://lore.kernel.org/r/20250215013636.1214612-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent d467e65 commit 8d1acfe

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/x86/pmu.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ void pmu_init(void)
1616
pmu.fixed_counter_width = (cpuid_10.d >> 5) & 0xff;
1717
}
1818

19-
if (pmu.version > 1) {
20-
pmu.nr_fixed_counters = cpuid_10.d & 0x1f;
21-
pmu.fixed_counter_width = (cpuid_10.d >> 5) & 0xff;
22-
}
23-
2419
pmu.nr_gp_counters = (cpuid_10.a >> 8) & 0xff;
2520
pmu.gp_counter_width = (cpuid_10.a >> 16) & 0xff;
2621
pmu.gp_counter_mask_length = (cpuid_10.a >> 24) & 0xff;

0 commit comments

Comments
 (0)