ARM: avoid faulting on qemu
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 27 Nov 2017 11:22:42 +0000 (11:22 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:53:05 +0000 (09:53 +0100)
commit14f13c9d58d8d738666d58fa7b2f8872286655bf
tree7bba0bb4d3f2839f774a9cc97d5043ed400dc22c
parent21e1e6192ba653dfcc42bb0b275a4af7af5e32b0
ARM: avoid faulting on qemu

commit 3aaf33bebda8d4ffcc0fc8ef39e6c1ac68823b11 upstream.

When qemu starts a kernel in a bare environment, the default SCR has
the AW and FW bits clear, which means that the kernel can't modify
the PSR A or PSR F bits, and means that FIQs and imprecise aborts are
always masked.

When running uboot under qemu, the AW and FW SCR bits are set, and the
kernel functions normally - and this is how real hardware behaves.

Fix this for qemu by ignoring the FIQ bit.

Fixes: 8bafae202c82 ("ARM: BUG if jumping to usermode address in kernel mode")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Alex Shi <alex.shi@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/kernel/entry-header.S