Re: [PATCH v2 13/17] x86/pat: Replace Intel x86_model checks with VFM ones
From: Dave Hansen
Date: Tue Feb 11 2025 - 16:12:00 EST
On 2/11/25 11:44, Sohil Mehta wrote:
> + if (c->x86_vendor == X86_VENDOR_INTEL &&
> + ((c->x86_vfm >= INTEL_PENTIUM_PRO && c->x86_vfm <= INTEL_PENTIUM_M_DOTHAN) ||
> + (c->x86_vfm >= INTEL_P4_WILLAMETTE && c->x86_vfm <= INTEL_P4_CEDARMILL))) {
Since these are both closed checks and not open-ended, is the
if (c->x86_vendor == X86_VENDOR_INTEL &&
bit needed or superfluous?
Also, super nit, can you vertically align the two range checks, please?
((c->x86_vfm >= INTEL_PENTIUM_PRO && c->x86_vfm <=
INTEL_PENTIUM_M_DOTHAN) ||
(c->x86_vfm >= INTEL_P4_WILLAMETTE && c->x86_vfm <=
INTEL_P4_CEDARMILL))) {