linux/arch/arm/vfp
Ard Biesheuvel c76c6c4ecb ARM: 9294/2: vfp: Fix broken softirq handling with instrumentation enabled
Commit 62b95a7b44 ("ARM: 9282/1: vfp: Manipulate task VFP state with
softirqs disabled") replaced the en/disable preemption calls inside the
VFP state handling code with en/disabling of soft IRQs, which is
necessary to allow kernel use of the VFP/SIMD unit when handling a soft
IRQ.

Unfortunately, when lockdep is enabled (or other instrumentation that
enables TRACE_IRQFLAGS), the disable path implemented in asm fails to
perform the lockdep and RCU related bookkeeping, resulting in spurious
warnings and other badness.

Set let's rework the VFP entry code a little bit so we can make the
local_bh_disable() call from C, with all the instrumentations that
happen to have been configured. Calling local_bh_enable() can be done
from asm, as it is a simple wrapper around __local_bh_enable_ip(), which
is always a callable function.

Link: https://lore.kernel.org/all/ZBBYCSZUJOWBg1s8@localhost.localdomain/

Fixes: 62b95a7b44 ("ARM: 9282/1: vfp: Manipulate task VFP state with softirqs disabled")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2023-04-12 10:04:56 +01:00
..
entry.S ARM: 9294/2: vfp: Fix broken softirq handling with instrumentation enabled 2023-04-12 10:04:56 +01:00
Makefile ARM: 8989/1: use .fpu assembler directives instead of assembler arguments 2020-07-21 16:33:37 +01:00
vfp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vfpdouble.c ARM: 8026/1: Fix emulation of multiply accumulate instructions 2014-04-14 23:28:24 +01:00
vfphw.S ARM: 9294/2: vfp: Fix broken softirq handling with instrumentation enabled 2023-04-12 10:04:56 +01:00
vfpinstr.h ARM: 8991/1: use VFP assembler mnemonics if available 2020-07-21 16:33:39 +01:00
vfpmodule.c ARM: 9294/2: vfp: Fix broken softirq handling with instrumentation enabled 2023-04-12 10:04:56 +01:00
vfpsingle.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00