summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2024-10-02 18:18:11 +0200
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-11-12 17:42:30 +0100
commit27035c23bad54ed552c6741210dd1c4fa50cb386 (patch)
tree72f45b5dbbc8043f7ef55a680b9d750a294aab93 /arch/arm
parentARM: 9424/1: vfp: Use vfp_state_hold() in vfp_sync_hwstate(). (diff)
downloadlinux-27035c23bad54ed552c6741210dd1c4fa50cb386.tar.xz
linux-27035c23bad54ed552c6741210dd1c4fa50cb386.zip
ARM: 9425/1: vfp: Use vfp_state_hold() in vfp_support_entry().
vfp_entry() is invoked from exception handler and is fully preemptible. It uses local_bh_disable() to remain uninterrupted while checking the VFP state. This is not working on PREEMPT_RT because local_bh_disable() synchronizes the relevant section but the context remains fully preemptible. Use vfp_state_hold() for uninterrupted access. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/vfp/vfpmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 1726db050076..28dafae7758b 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -708,7 +708,7 @@ static int vfp_support_entry(struct pt_regs *regs, u32 trigger)
if (!user_mode(regs))
return vfp_kmode_exception(regs, trigger);
- local_bh_disable();
+ vfp_state_hold();
fpexc = fmrx(FPEXC);
/*
@@ -787,7 +787,7 @@ static int vfp_support_entry(struct pt_regs *regs, u32 trigger)
if (!(fpscr & FPSCR_IXE)) {
if (!(fpscr & FPSCR_LENGTH_MASK)) {
pr_debug("not VFP\n");
- local_bh_enable();
+ vfp_state_release();
return -ENOEXEC;
}
fpexc |= FPEXC_DEX;
@@ -797,7 +797,7 @@ bounce: regs->ARM_pc += 4;
VFP_bounce(trigger, fpexc, regs);
}
- local_bh_enable();
+ vfp_state_release();
return 0;
}