Re: [PATCH v1 00/40] x86: Leaf 0x2 and leaf 0x4 refactorings

Ingo Molnar
2025-03-04T09:19:29Z

* Ahmed S. Darwish <darwi@linutronix.de> wrote:

> Hi,
>
> As part of the onging x86-cpuid work [*], we've found that the handling
> of leaf 0x2 and leaf 0x4 code paths is difficult to work with in its
> current state. This was mostly due to the organic growth of the x86/cpu
> and x86/cacheinfo logic since its very early Linux days.
>
> This series cleans up and refactors these code paths in preparation for
> the new x86-cpuid model.

Nice!

> Summary:
>
> - Patches 1 to 3 are independent bugfixes that were discovered during
> this refactoring work.

I've applied these three to tip:x86/urgent. I added Cc: stable to all 3
commits, because while these are old bugs, the first one had Cc: stable
and if we do it for one it's justified for all of them AFAICS. Arguably
our cacheinfo output in procps was inaccurate at times, and possibly
these bugs were part of the problem.

> - Patches 4 to 10 are x86/cpu refactorings for code size and
> readability.

I've applied patches 4 to 9 to tip:x86/cpu (with x86/urgent merged in
due to dependencies and to give a singular topical base branch in the
x86 tree), they look good and obvious. (I added the build fix to 05/40)

I've left 10 to 40 for further review by others too.

Thanks,

Ingo