linux-brain/arch/arm/vfp
Ard Biesheuvel a3e438db75 ARM: 9044/1: vfp: use undef hook for VFP support detection
commit 3cce9d44321e460e7c88cdec4e4537a6e9ad7c0d upstream.

Commit f77ac2e378be9dd6 ("ARM: 9030/1: entry: omit FP emulation for UND
exceptions taken in kernel mode") failed to take into account that there
is in fact a case where we relied on this code path: during boot, the
VFP detection code issues a read of FPSID, which will trigger an undef
exception on cores that lack VFP support.

So let's reinstate this logic using an undef hook which is registered
only for the duration of the initcall to vpf_init(), and which sets
VFP_arch to a non-zero value - as before - if no VFP support is present.

Fixes: f77ac2e378be9dd6 ("ARM: 9030/1: entry: omit FP emulation for UND ...")
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-24 11:26:35 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
entry.S ARM: 9044/1: vfp: use undef hook for VFP support detection 2021-03-24 11:26:35 +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: 9030/1: entry: omit FP emulation for UND exceptions taken in kernel mode 2021-03-24 11:26:35 +01:00
vfpinstr.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vfpmodule.c ARM: 9044/1: vfp: use undef hook for VFP support detection 2021-03-24 11:26:35 +01:00
vfpsingle.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00