]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 9044/1: vfp: use undef hook for VFP support detection
authorArd Biesheuvel <ardb@kernel.org>
Sat, 19 Dec 2020 15:29:58 +0000 (16:29 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Mon, 21 Dec 2020 11:19:19 +0000 (11:19 +0000)
commit3cce9d44321e460e7c88cdec4e4537a6e9ad7c0d
tree8b5c828491ea81dbc32f40c3a279f0652ac2054b
parentf77ac2e378be9dd61eb88728f0840642f045d9d1
ARM: 9044/1: vfp: use undef hook for VFP support detection

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>
arch/arm/vfp/entry.S
arch/arm/vfp/vfpmodule.c