diff options
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 4d5279c95d5f..37830de8f60a 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -581,14 +581,9 @@ void cpu_detect(struct cpuinfo_x86 *c) | |||
581 | u32 junk, tfms, cap0, misc; | 581 | u32 junk, tfms, cap0, misc; |
582 | 582 | ||
583 | cpuid(0x00000001, &tfms, &misc, &junk, &cap0); | 583 | cpuid(0x00000001, &tfms, &misc, &junk, &cap0); |
584 | c->x86 = (tfms >> 8) & 0xf; | 584 | c->x86 = x86_family(tfms); |
585 | c->x86_model = (tfms >> 4) & 0xf; | 585 | c->x86_model = x86_model(tfms); |
586 | c->x86_mask = tfms & 0xf; | 586 | c->x86_mask = x86_stepping(tfms); |
587 | |||
588 | if (c->x86 == 0xf) | ||
589 | c->x86 += (tfms >> 20) & 0xff; | ||
590 | if (c->x86 >= 0x6) | ||
591 | c->x86_model += ((tfms >> 16) & 0xf) << 4; | ||
592 | 587 | ||
593 | if (cap0 & (1<<19)) { | 588 | if (cap0 & (1<<19)) { |
594 | c->x86_clflush_size = ((misc >> 8) & 0xff) * 8; | 589 | c->x86_clflush_size = ((misc >> 8) & 0xff) * 8; |
@@ -1187,7 +1182,7 @@ void syscall_init(void) | |||
1187 | * They both write to the same internal register. STAR allows to | 1182 | * They both write to the same internal register. STAR allows to |
1188 | * set CS/DS but only a 32bit target. LSTAR sets the 64bit rip. | 1183 | * set CS/DS but only a 32bit target. LSTAR sets the 64bit rip. |
1189 | */ | 1184 | */ |
1190 | wrmsrl(MSR_STAR, ((u64)__USER32_CS)<<48 | ((u64)__KERNEL_CS)<<32); | 1185 | wrmsr(MSR_STAR, 0, (__USER32_CS << 16) | __KERNEL_CS); |
1191 | wrmsrl(MSR_LSTAR, (unsigned long)entry_SYSCALL_64); | 1186 | wrmsrl(MSR_LSTAR, (unsigned long)entry_SYSCALL_64); |
1192 | 1187 | ||
1193 | #ifdef CONFIG_IA32_EMULATION | 1188 | #ifdef CONFIG_IA32_EMULATION |