Skip to content

x86/topology: Fix CPUID.1F handling

Zhang Rui linux-hwmon lkml stable 4 versions – Applied

Status from this message: The following commit has been merged into the x86/urgent branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 4 repliesApplied
  2. v38 patches 11 repliesSuperseded
  3. v28 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches12 repliesSuperseded

Changes in v4 from the cover letter

- Drop a fix for a potential issue, as well as document cleanups/updates. So this patch series only contains bug fixes (stable candidates).
- Integrate the patch subject/changelog improvements from Dave.
- Add Fixes tags.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4hwmon/coretemp: Rename indx to indexdrivers/hwmon/coretemp.c+9 -94 replies
2/4hwmon/coretemp: Handle large core ID valuedrivers/hwmon/coretemp.c+41 -150 replies
3/4x86/topology: Fix multiple packages shown on a single-package systemarch/x86/kernel/cpu/topology.c+10 -40 replies
4/4x86/topology: Fix duplicated core ID within a packagearch/x86/kernel/cpu/topology.c+1 -10 replies

Reviews trailers per patch

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

PatchLen BrownGuenter Roeck
1/4A-b
2/4A-b A-b
3/4R-b
4/4R-b

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

Read the v4 thread

Cover letter [PATCH V4 0/4] x86/topology: Fix CPUID.1F handling

Handling for CPUID.1F is introduced by commit 7745f03eb395 ("x86/topology:
Add CPUID.1F multi-die/package support").
And only SMT/Core/Die level types are supported at that time.

On Intel AlderLake-N platforms where there are Ecores only, the Ecore Module topology is enumerated via CPUID.1F Module level.

This exposes two bugs in the CPUID.1F handling code,
1. Linux interprets the Module ID bits as package ID and erroneously reports a multi module system as a multi-package system.
2. Linux excludes the unknown Module ID bits from the core ID, and results in duplicate core ID’s shown in a package after the first issue solved.

Patch 3/4 and 4/4 fixes these two problems in CPUID.1F handling code, and patch 1/4 and 2/4 are needed to avoid potential regressions.

thanks,
-rui

---
Changes in V4:
- Drop a fix for a potential issue, as well as document cleanups/updates. So this patch series only contains bug fixes (stable candidates).
- Integrate the patch subject/changelog improvements from Dave.
- Add Fixes tags.

Changes in V3:
- changelog improvements based on Peter' feedback
- Remove combined tags

Changes in V2:
- fix/improve changelog/comment wording issues
- reorder the patches to eliminate bisection breakage window
- add a new patch for coretemp driver variable renaming
- update coretemp driver patch to fix a case of ida_free(&ida, -2)