Skip to content
Commit 0fcd7c2c authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Bruce Ashfield
Browse files

ARM: vfp: Provide vfp_lock() for VFP locking.



kernel_neon_begin() uses local_bh_disable() to ensure exclusive access
to the VFP unit. This is broken on PREEMPT_RT because a BH disabled
section remains preemptible on PREEMPT_RT.

Introduce vfp_lock() which uses local_bh_disable() and preempt_disable()
on PREEMPT_RT. Since softirqs are processed always in thread context,
disabling preemption is enough to ensure that the current context won't
get interrupted by something that is using the VFP. Use it in
kernel_neon_begin().

Link: https://lore.kernel.org/r/20230519145731.574867-2-bigeasy@linutronix.de
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
parent 67cdd360
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment