kernel/x86_64: Rename some macros to allow easier i386/x86_64 code sharing.
authorSascha Wildner <saw@online.de>
Thu, 2 Jun 2011 06:20:01 +0000 (08:20 +0200)
committerSascha Wildner <saw@online.de>
Thu, 2 Jun 2011 06:20:01 +0000 (08:20 +0200)
sys/cpu/x86_64/include/specialreg.h
sys/platform/pc64/x86_64/initcpu.c

index c27422f..559ce6b 100644 (file)
 #define        CPUID_FAMILY            0x00000f00
 #define        CPUID_EXT_MODEL         0x000f0000
 #define        CPUID_EXT_FAMILY        0x0ff00000
-#define        X86_64_CPU_MODEL(id) \
+#define        CPUID_TO_MODEL(id) \
     ((((id) & CPUID_MODEL) >> 4) | \
     (((id) & CPUID_EXT_MODEL) >> 12))
-#define        X86_64_CPU_FAMILY(id) \
+#define        CPUID_TO_FAMILY(id) \
     ((((id) & CPUID_FAMILY) >> 8) + \
     (((id) & CPUID_EXT_FAMILY) >> 20))
 
index d493a89..1755377 100644 (file)
@@ -183,7 +183,7 @@ initializecpu(void)
 #endif
        }
        if (cpu_vendor_id == CPU_VENDOR_CENTAUR &&
-           X86_64_CPU_FAMILY(cpu_id) == 0x6 &&
-           X86_64_CPU_MODEL(cpu_id) >= 0xf)
+           CPUID_TO_FAMILY(cpu_id) == 0x6 &&
+           CPUID_TO_MODEL(cpu_id) >= 0xf)
                init_via();
 }