Skip to content

x86/fpu: Make fpu_lock() RT compliant

Thomas Gleixner lkml 1 version Applied

Status from this message: The following commit has been merged into the x86/fpu branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2x86/fpu: Simplify fpregs_[un]lock()arch/x86/include/asm/fpu/api.h+3 -20 replies
2/2x86/fpu: Make kernel FPU protection RT friendlyarch/x86/include/asm/fpu/api.h+14 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/2] x86/fpu: Make fpu_lock() RT compliant

FPU serialization uses

    preempt_disable(); local_bh_disable();

which is silly because local_bh_disable() implicitly disables preemption. So this can be reduced to local_bh_disable().

But this does not work on RT kernels because local_bh_disable() only serializes bottom half related processing via a local lock, but does not disable preemption.

On RT kernels preempt_disable() is the right choice because on RT bottom half processing is always in thread context, so preempt_disable() implicitly protects against bottom half processing there.

Thanks,

tglx