Skip to content

Commit 9c48eb6

Browse files
committed
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Thomas Gleixner: "Unbreak the CPUID CPUID_8000_0008_EBX reload which got dropped when the evaluation of physical and virtual bits which uses the same CPUID leaf was moved out of get_cpu_cap()" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Restore CPUID_8000_0008_EBX reload
2 parents fe282c6 + c65732e commit 9c48eb6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/x86/kernel/cpu/common.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,11 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
848848
c->x86_power = edx;
849849
}
850850

851+
if (c->extended_cpuid_level >= 0x80000008) {
852+
cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
853+
c->x86_capability[CPUID_8000_0008_EBX] = ebx;
854+
}
855+
851856
if (c->extended_cpuid_level >= 0x8000000a)
852857
c->x86_capability[CPUID_8000_000A_EDX] = cpuid_edx(0x8000000a);
853858

@@ -871,7 +876,6 @@ static void get_cpu_address_sizes(struct cpuinfo_x86 *c)
871876

872877
c->x86_virt_bits = (eax >> 8) & 0xff;
873878
c->x86_phys_bits = eax & 0xff;
874-
c->x86_capability[CPUID_8000_0008_EBX] = ebx;
875879
}
876880
#ifdef CONFIG_X86_32
877881
else if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36))

0 commit comments

Comments
 (0)