Re: [PATCH 2/2] x86/cpu/amd: Enable the fixed intructions retired free counter IRPERF

From: Andi Kleen
Date: Wed Jan 15 2020 - 23:03:29 EST


> + if (cpu_has(c, X86_FEATURE_IRPERF) &&
> + !(c->x86 == 0x17 && c->x86_model <= 0x1f))

Such checks are normally through a x86_pmu lag or possibly a X86_BUG_* flag

> + msr_set_bit(MSR_K7_HWCR, MSR_K7_HWCR_IRPERF_EN_BIT);
> }
>
> #ifdef CONFIG_X86_32
> --
> 2.24.1
>