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

Andi Kleen
2020-01-16T04:03:28Z

> + 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
>