lkml.org 
[lkml]   [2024]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v4 24/71] perf/x86/msr: Switch to new Intel CPU model defines
Date
> Well, my point is that a .x86_vfm switch:
>
>> + switch (boot_cpu_data.x86_vfm) {
>> + case INTEL_NEHALEM:
>> + case INTEL_NEHALEM_G:
>
> implicitly checks boot_cpu_data.x86==6. So the explicit check can now
> go away, no matter what CPUs are being checked.

Implicitly checks vendor too. So the whole:

if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL ||
boot_cpu_data.x86 != 6)
return false;

can go away (assuming this isn't used in some performance critical path
where the quick return would make some difference for AMD.

-Tony
\
 
 \ /
  Last update: 2024-04-25 18:54    [W:0.108 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site