]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/x86/kcpuid: Define Transmeta and Centaur index ranges
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 14:20:36 +0000 (15:20 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 08:53:46 +0000 (09:53 +0100)
Explicitly define the CPUID index ranges for Transmeta (0x80860000) and
Centaur/Zhaoxin (0xc0000000).

Without these explicit definitions, their respective CPUID indices would
be skipped during CSV bitfield parsing.

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-16-darwi@linutronix.de
tools/arch/x86/kcpuid/kcpuid.c

index fe3d0581afd150946e4af9f9dd185359ea99b44f..7dc6b9235d023f1ceb3582670cd328e2b69c68d3 100644 (file)
@@ -69,6 +69,8 @@ struct cpuid_func {
 enum range_index {
        RANGE_STD = 0,                  /* Standard */
        RANGE_EXT = 0x80000000,         /* Extended */
+       RANGE_TSM = 0x80860000,         /* Transmeta */
+       RANGE_CTR = 0xc0000000,         /* Centaur/Zhaoxin */
 };
 
 #define CPUID_INDEX_MASK               0xffff0000
@@ -85,6 +87,8 @@ struct cpuid_range {
 static struct cpuid_range ranges[] = {
        {       .index          = RANGE_STD,    },
        {       .index          = RANGE_EXT,    },
+       {       .index          = RANGE_TSM,    },
+       {       .index          = RANGE_CTR,    },
 };
 
 static char *range_to_str(struct cpuid_range *range)
@@ -92,6 +96,8 @@ static char *range_to_str(struct cpuid_range *range)
        switch (range->index) {
        case RANGE_STD:         return "Standard";
        case RANGE_EXT:         return "Extended";
+       case RANGE_TSM:         return "Transmeta";
+       case RANGE_CTR:         return "Centaur";
        default:                return NULL;
        }
 }