Re: [PATCH 0/5] x86/cpu: Introduce <asm/cpuid/types.h> and <asm/cpuid/api.h> and clean them up
From: H. Peter Anvin
Date: Tue Mar 18 2025 - 10:06:36 EST
On March 17, 2025 3:18:19 PM PDT, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>This series contains Ahmed S. Darwish's splitting up of <asm/cpuid.h>
>into <asm/cpuid/types.h> and <asm/cpuid/api.h>, followed by a couple
>of cleanups that create a more maintainable base.
>
>Thanks,
>
> Ingo
>
>================>
>Ahmed S. Darwish (1):
> x86/cpuid: Refactor <asm/cpuid.h>
>
>Ingo Molnar (4):
> x86/cpuid: Clean up <asm/cpuid/types.h>
> x86/cpuid: Clean up <asm/cpuid/api.h>
> x86/cpuid: Standardize on u32 in <asm/cpuid/api.h>
> x86/cpuid: Use u32 in instead of uint32_t in <asm/cpuid/api.h>
>
> arch/x86/include/asm/cpuid.h | 217 +--------------------------------------------------------
> arch/x86/include/asm/cpuid/api.h | 210 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> arch/x86/include/asm/cpuid/types.h | 32 +++++++++
> 3 files changed, 243 insertions(+), 216 deletions(-)
> create mode 100644 arch/x86/include/asm/cpuid/api.h
> create mode 100644 arch/x86/include/asm/cpuid/types.h
>
It would be nice to get rid of the bleacherous use of *eax and *ecx as input-output operands. The use of four separate pointers is just barely tolerable because the compiler can remove them when the asm is inlined.