]> git.ipfire.org Git - thirdparty/linux.git/commit
tools/x86/kcpuid: Print correct CPUID output register names
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 14:20:26 +0000 (15:20 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 08:53:44 +0000 (09:53 +0100)
commitce61b6067d8cbfcd3607d942913b21c7ce2b384b
treee94f4ff9ef7c360cd31f5c6feb12c620d45620a3
parent6bef74cab03ada39f16f1fb86b732f7c71a9f07a
tools/x86/kcpuid: Print correct CPUID output register names

kcpuid --all --detail claims that all bits belong to ECX, in the form
of the header CPUID_${leaf}_ECX[${subleaf}].

Print the correct register name for all CPUID output.

kcpuid --detail also dumps the raw register value if a leaf/subleaf is
covered in the CSV file, but a certain output register within it is not
covered by any CSV entry.  Since register names are now properly printed,
and since the CSV file has become exhaustive using x86-cpuid-db, remove
that value dump as it pollutes the output.

While at it, rename decode_bits() to show_reg().  This makes it match its
show_range(), show_leaf() and show_reg_header() counterparts.

Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20250324142042.29010-6-darwi@linutronix.de
tools/arch/x86/kcpuid/kcpuid.c