diff options
author | Arnd Bergmann <arnd@arndb.de> | 2021-10-18 16:30:07 +0200 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2021-10-25 14:12:33 +0200 |
commit | 8b5bd5adf9e6d073e538e2e9de810f2f25379c3b (patch) | |
tree | e267640f488fd8625aaea7af26042b34f6068ee4 /block/Makefile | |
parent | ARM: 9136/1: ARMv7-M uses BE-8, not BE-32 (diff) | |
download | linux-8b5bd5adf9e6d073e538e2e9de810f2f25379c3b.tar.xz linux-8b5bd5adf9e6d073e538e2e9de810f2f25379c3b.zip |
ARM: 9137/1: disallow CONFIG_THUMB with ARMv4
We can currently build a multi-cpu enabled kernel that allows both ARMv4
and ARMv5 CPUs, and also supports THUMB mode in user space.
However, returning to user space in this configuration with the usr_ret
macro requires the use of the 'bx' instruction, which is refused by
the assembler:
arch/arm/kernel/entry-armv.S: Assembler messages:
arch/arm/kernel/entry-armv.S:937: Error: selected processor does not support `bx lr' in ARM mode
arch/arm/kernel/entry-armv.S:960: Error: selected processor does not support `bx lr' in ARM mode
arch/arm/kernel/entry-armv.S:1003: Error: selected processor does not support `bx lr' in ARM mode
<instantiation>:2:2: note: instruction requires: armv4t
bx lr
While it would be possible to handle this correctly in principle, doing so
seems to not be worth it, if we can simply avoid the problem by enforcing
that a kernel supporting both ARMv4 and a later CPU architecture cannot
run THUMB binaries.
This turned up while build-testing with clang; for some reason,
gcc never triggered the problem.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'block/Makefile')
0 files changed, 0 insertions, 0 deletions