Skip to content

Commit 04a1007

Browse files
author
Ingo Molnar
committed
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 <[email protected]> Cc: Andrew Cooper <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: John Ogness <[email protected]> Cc: "Ahmed S. Darwish" <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent adc5742 commit 04a1007

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

arch/x86/include/asm/cpuid/types.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
#include <linux/types.h>
66

77
/*
8-
* Types for raw CPUID access
8+
* Types for raw CPUID access:
99
*/
1010

1111
struct cpuid_regs {
12-
u32 eax, ebx, ecx, edx;
12+
u32 eax;
13+
u32 ebx;
14+
u32 ecx;
15+
u32 edx;
1316
};
1417

1518
enum cpuid_regs_idx {
@@ -19,8 +22,8 @@ enum cpuid_regs_idx {
1922
CPUID_EDX,
2023
};
2124

22-
#define CPUID_LEAF_MWAIT 0x5
23-
#define CPUID_LEAF_DCA 0x9
25+
#define CPUID_LEAF_MWAIT 0x05
26+
#define CPUID_LEAF_DCA 0x09
2427
#define CPUID_LEAF_XSTATE 0x0d
2528
#define CPUID_LEAF_TSC 0x15
2629
#define CPUID_LEAF_FREQ 0x16

0 commit comments

Comments
 (0)