Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
"Various low level fixes: fix more fallout from the FPU rework and the
asm entry code rework, plus an MSI rework fix, and an idle-tracing fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/fpu/math-emu: Fix crash in fork()
x86/fpu/math-emu: Fix math-emu boot crash
x86/idle: Restore trace_cpu_idle to mwait_idle() calls
x86/irq: Build correct vector mapping for multiple MSI interrupts
Revert "sched/x86_64: Don't save flags on context switch"

+14 -11
+4 -8
arch/x86/include/asm/switch_to.h
··· 79 79 #else /* CONFIG_X86_32 */ 80 80 81 81 /* frame pointer must be last for get_wchan */ 82 - #define SAVE_CONTEXT "pushq %%rbp ; movq %%rsi,%%rbp\n\t" 83 - #define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp\t" 82 + #define SAVE_CONTEXT "pushf ; pushq %%rbp ; movq %%rsi,%%rbp\n\t" 83 + #define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp ; popf\t" 84 84 85 85 #define __EXTRA_CLOBBER \ 86 86 , "rcx", "rbx", "rdx", "r8", "r9", "r10", "r11", \ 87 - "r12", "r13", "r14", "r15", "flags" 87 + "r12", "r13", "r14", "r15" 88 88 89 89 #ifdef CONFIG_CC_STACKPROTECTOR 90 90 #define __switch_canary \ ··· 100 100 #define __switch_canary_iparam 101 101 #endif /* CC_STACKPROTECTOR */ 102 102 103 - /* 104 - * There is no need to save or restore flags, because flags are always 105 - * clean in kernel mode, with the possible exception of IOPL. Kernel IOPL 106 - * has no effect. 107 - */ 103 + /* Save restore flags to clear handle leaking NT */ 108 104 #define switch_to(prev, next, last) \ 109 105 asm volatile(SAVE_CONTEXT \ 110 106 "movq %%rsp,%P[threadrsp](%[prev])\n\t" /* save RSP */ \
+1 -1
arch/x86/kernel/apic/vector.c
··· 322 322 irq_data->chip = &lapic_controller; 323 323 irq_data->chip_data = data; 324 324 irq_data->hwirq = virq + i; 325 - err = assign_irq_vector_policy(virq, irq_data->node, data, 325 + err = assign_irq_vector_policy(virq + i, irq_data->node, data, 326 326 info); 327 327 if (err) 328 328 goto error;
+1 -1
arch/x86/kernel/fpu/core.c
··· 270 270 dst_fpu->fpregs_active = 0; 271 271 dst_fpu->last_cpu = -1; 272 272 273 - if (src_fpu->fpstate_active) 273 + if (src_fpu->fpstate_active && cpu_has_fpu) 274 274 fpu_copy(dst_fpu, src_fpu); 275 275 276 276 return 0;
+6 -1
arch/x86/kernel/fpu/init.c
··· 40 40 write_cr0(cr0); 41 41 42 42 /* Flush out any pending x87 state: */ 43 - asm volatile ("fninit"); 43 + #ifdef CONFIG_MATH_EMULATION 44 + if (!cpu_has_fpu) 45 + fpstate_init_soft(&current->thread.fpu.state.soft); 46 + else 47 + #endif 48 + asm volatile ("fninit"); 44 49 } 45 50 46 51 /*
+2
arch/x86/kernel/process.c
··· 408 408 static void mwait_idle(void) 409 409 { 410 410 if (!current_set_polling_and_test()) { 411 + trace_cpu_idle_rcuidle(1, smp_processor_id()); 411 412 if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR)) { 412 413 smp_mb(); /* quirk */ 413 414 clflush((void *)&current_thread_info()->flags); ··· 420 419 __sti_mwait(0, 0); 421 420 else 422 421 local_irq_enable(); 422 + trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); 423 423 } else { 424 424 local_irq_enable(); 425 425 }