|
@@ -549,13 +549,15 @@ static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_X86_64
|
|
|
|
if (c->extended_cpuid_level >= 0x80000008) {
|
|
if (c->extended_cpuid_level >= 0x80000008) {
|
|
u32 eax = cpuid_eax(0x80000008);
|
|
u32 eax = cpuid_eax(0x80000008);
|
|
|
|
|
|
c->x86_virt_bits = (eax >> 8) & 0xff;
|
|
c->x86_virt_bits = (eax >> 8) & 0xff;
|
|
c->x86_phys_bits = eax & 0xff;
|
|
c->x86_phys_bits = eax & 0xff;
|
|
}
|
|
}
|
|
|
|
+#ifdef CONFIG_X86_32
|
|
|
|
+ else if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36))
|
|
|
|
+ c->x86_phys_bits = 36;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
if (c->extended_cpuid_level >= 0x80000007)
|
|
if (c->extended_cpuid_level >= 0x80000007)
|
|
@@ -602,8 +604,12 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
|
|
{
|
|
{
|
|
#ifdef CONFIG_X86_64
|
|
#ifdef CONFIG_X86_64
|
|
c->x86_clflush_size = 64;
|
|
c->x86_clflush_size = 64;
|
|
|
|
+ c->x86_phys_bits = 36;
|
|
|
|
+ c->x86_virt_bits = 48;
|
|
#else
|
|
#else
|
|
c->x86_clflush_size = 32;
|
|
c->x86_clflush_size = 32;
|
|
|
|
+ c->x86_phys_bits = 32;
|
|
|
|
+ c->x86_virt_bits = 32;
|
|
#endif
|
|
#endif
|
|
c->x86_cache_alignment = c->x86_clflush_size;
|
|
c->x86_cache_alignment = c->x86_clflush_size;
|
|
|
|
|
|
@@ -726,9 +732,13 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
|
|
c->x86_coreid_bits = 0;
|
|
c->x86_coreid_bits = 0;
|
|
#ifdef CONFIG_X86_64
|
|
#ifdef CONFIG_X86_64
|
|
c->x86_clflush_size = 64;
|
|
c->x86_clflush_size = 64;
|
|
|
|
+ c->x86_phys_bits = 36;
|
|
|
|
+ c->x86_virt_bits = 48;
|
|
#else
|
|
#else
|
|
c->cpuid_level = -1; /* CPUID not detected */
|
|
c->cpuid_level = -1; /* CPUID not detected */
|
|
c->x86_clflush_size = 32;
|
|
c->x86_clflush_size = 32;
|
|
|
|
+ c->x86_phys_bits = 32;
|
|
|
|
+ c->x86_virt_bits = 32;
|
|
#endif
|
|
#endif
|
|
c->x86_cache_alignment = c->x86_clflush_size;
|
|
c->x86_cache_alignment = c->x86_clflush_size;
|
|
memset(&c->x86_capability, 0, sizeof c->x86_capability);
|
|
memset(&c->x86_capability, 0, sizeof c->x86_capability);
|