Skip to content

x86: Complete backports for x86_match_cpu()

Ricardo Neri stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2powercap: RAPL: fix invalid initialization for pl4_supported fielddrivers/powercap/intel_rapl_msr.c+6 -61 reply
2/2x86/mm: Switch to new Intel CPU model definesarch/x86/mm/init.c+6 -101 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchPawan Gupta
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 6.1.y 0/2] x86: Complete backports for x86_match_cpu()

Hi,

Upstream commit 93022482b294 ("x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL") introduced a flags member to struct x86_cpu_id. Bit 0 of x86_cpu.id.flags must be set to 1 for x86_match_cpu() to work correctly. This upstream commit has been backported to 6.1.y.

Callers that use the X86_MATCH_*() family of macros to compose the argument of x86_match_cpu() function correctly. Callers that use their own custom mechanisms may not work if they fail to set x86_cpu_id.flags correctly.

There are two remaining callers in 6.1.y that use their own mechanisms:
setup_pcid() and rapl_msr_probe(). The former caused a regression that Thomas Lindroth reported in [1]. The latter works by luck but it still populates its x86_cpu_id[] array incorrectly.

I backported two patches that fix these bugs in mainline. Hopefully the authors and/or maintainers can ack the backports?

I tested these patches in Alder Lake and Meteor Lake systems as the two involved callers behave differently on these two systems. I wrote the testing details in each patch separately.

Thanks and BR,
Ricardo
[1]. https://lore.kernel.org/all/[email protected]/

Sumeet Pawnikar (1):
powercap: RAPL: fix invalid initialization for pl4_supported field

Tony Luck (1):
x86/mm: Switch to new Intel CPU model defines

 arch/x86/mm/init.c                | 16 ++++++----------
 drivers/powercap/intel_rapl_msr.c | 12 ++++++------
 2 files changed, 12 insertions(+), 16 deletions(-)
Signature · 1 line
2.34.1