[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174229920928.14745.4554052390199881261.tip-bot2@tip-bot2>
Date: Tue, 18 Mar 2025 12:00:09 -0000
From: "tip-bot2 for Ingo Molnar" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Ingo Molnar <mingo@...nel.org>, Andrew Cooper <andrew.cooper3@...rix.com>,
"H. Peter Anvin" <hpa@...or.com>, John Ogness <john.ogness@...utronix.de>,
"Ahmed S. Darwish" <darwi@...utronix.de>, x86-cpuid@...ts.linux.dev,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/cpu] x86/cpuid: Clean up <asm/cpuid/types.h>
The following commit has been merged into the x86/cpu branch of tip:
Commit-ID: 67a7ae050e7c2e9f9c5d1099909f7a1d45c3181e
Gitweb: https://git.kernel.org/tip/67a7ae050e7c2e9f9c5d1099909f7a1d45c3181e
Author: Ingo Molnar <mingo@...nel.org>
AuthorDate: Mon, 17 Mar 2025 23:18:21 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Tue, 18 Mar 2025 09:35:57 +01:00
x86/cpuid: Clean up <asm/cpuid/types.h>
- We have 0x0d, 0x9 and 0x1d as literals for the CPUID_LEAF definitions,
pick a single, consistent style of 0xZZ literals.
- Likewise, harmonize the style of the 'struct cpuid_regs' list of
registers with that of 'enum cpuid_regs_idx'. Because while computers
don't care about unnecessary visual noise, humans do.
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: Andrew Cooper <andrew.cooper3@...rix.com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: John Ogness <john.ogness@...utronix.de>
Cc: "Ahmed S. Darwish" <darwi@...utronix.de>
Cc: x86-cpuid@...ts.linux.dev
Link: https://lore.kernel.org/r/20250317221824.3738853-3-mingo@kernel.org
---
arch/x86/include/asm/cpuid/types.h | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/cpuid/types.h b/arch/x86/include/asm/cpuid/types.h
index 724002a..8582e27 100644
--- a/arch/x86/include/asm/cpuid/types.h
+++ b/arch/x86/include/asm/cpuid/types.h
@@ -5,11 +5,14 @@
#include <linux/types.h>
/*
- * Types for raw CPUID access
+ * Types for raw CPUID access:
*/
struct cpuid_regs {
- u32 eax, ebx, ecx, edx;
+ u32 eax;
+ u32 ebx;
+ u32 ecx;
+ u32 edx;
};
enum cpuid_regs_idx {
@@ -19,8 +22,8 @@ enum cpuid_regs_idx {
CPUID_EDX,
};
-#define CPUID_LEAF_MWAIT 0x5
-#define CPUID_LEAF_DCA 0x9
+#define CPUID_LEAF_MWAIT 0x05
+#define CPUID_LEAF_DCA 0x09
#define CPUID_LEAF_XSTATE 0x0d
#define CPUID_LEAF_TSC 0x15
#define CPUID_LEAF_FREQ 0x16
Powered by blists - more mailing lists