]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/cpu: Replace PEBS use of 'x86_cpu_desc' use with 'x86_cpu_id'
authorDave Hansen <dave.hansen@linux.intel.com>
Fri, 13 Dec 2024 18:51:31 +0000 (10:51 -0800)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 18 Dec 2024 00:19:05 +0000 (16:19 -0800)
commit3fa5626720c0948ce067306c4f6558d9ec86020c
treec29682ba14044795bbde1017f44242d8e8acf8ca
parent85b08180df07b9a5984b15ae31d76b904d42a115
x86/cpu: Replace PEBS use of 'x86_cpu_desc' use with 'x86_cpu_id'

The 'x86_cpu_desc' and 'x86_cpu_id' structures are very similar.
Reduce duplicate infrastructure by moving the few users of
'x86_cpu_desc' to the much more common variant.

The existing X86_MATCH_VFM_STEPS() helper matches ranges of
steppings. Instead of introducing a single-stepping match function
which could get confusing when paired with the range, just use
the stepping min/max match helper and use min==max.

Note that this makes the table more vertically compact because
multiple entries like this:

       INTEL_CPU_DESC(INTEL_SKYLAKE_X,          4, 0x00000000),
       INTEL_CPU_DESC(INTEL_SKYLAKE_X,          5, 0x00000000),
       INTEL_CPU_DESC(INTEL_SKYLAKE_X,          6, 0x00000000),
       INTEL_CPU_DESC(INTEL_SKYLAKE_X,          7, 0x00000000),

can be consolidated down to a single stepping range.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20241213185131.8B610039%40davehans-spike.ostc.intel.com
arch/x86/events/intel/core.c