Commit f26bdbe1 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Russell King (Oracle)
Browse files

ARM: 9423/1: vfp: Provide vfp_state_hold() 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_state_hold() 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().

Reviewed-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
parent ad8d1e32
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment