x86/fpu: Simplify fpregs_[un]lock()
[sfrench/cifs-2.6.git] / arch / x86 / include / asm / fpu / api.h
index dcd9503b1098388d415c7cdd89428090292ecf21..2c5bef78a4844eb1956d11a4f279e2de4057bc8e 100644 (file)
@@ -29,17 +29,18 @@ extern void fpregs_mark_activate(void);
  * A context switch will (and softirq might) save CPU's FPU registers to
  * fpu->state and set TIF_NEED_FPU_LOAD leaving CPU's FPU registers in
  * a random state.
+ *
+ * local_bh_disable() protects against both preemption and soft interrupts
+ * on !RT kernels.
  */
 static inline void fpregs_lock(void)
 {
-       preempt_disable();
        local_bh_disable();
 }
 
 static inline void fpregs_unlock(void)
 {
        local_bh_enable();
-       preempt_enable();
 }
 
 #ifdef CONFIG_X86_DEBUG_FPU