Message ID | 20231031092921.2885109-2-dapeng1.mi@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix PMU test failures on Sapphire Rapids | expand |
On Tue, Oct 31, 2023 at 2:21 AM Dapeng Mi <dapeng1.mi@linux.intel.com> wrote: > > From: Xiong Zhang <xiong.y.zhang@intel.com> > > There are totally same code in pmu_init() helper, remove the duplicate > code. > > Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com> > Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Reviewed-by: Jim Mattson <jmattson@google.com>
diff --git a/lib/x86/pmu.c b/lib/x86/pmu.c index 0f2afd650bc9..d06e94553024 100644 --- a/lib/x86/pmu.c +++ b/lib/x86/pmu.c @@ -16,11 +16,6 @@ void pmu_init(void) pmu.fixed_counter_width = (cpuid_10.d >> 5) & 0xff; } - if (pmu.version > 1) { - pmu.nr_fixed_counters = cpuid_10.d & 0x1f; - pmu.fixed_counter_width = (cpuid_10.d >> 5) & 0xff; - } - pmu.nr_gp_counters = (cpuid_10.a >> 8) & 0xff; pmu.gp_counter_width = (cpuid_10.a >> 16) & 0xff; pmu.gp_counter_mask_length = (cpuid_10.a >> 24) & 0xff;