]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 8266/1: Remove early stack deallocation from restore_user_regs
authorDaniel Thompson <daniel.thompson@linaro.org>
Fri, 9 Jan 2015 17:30:13 +0000 (18:30 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 12 Jan 2015 19:26:57 +0000 (19:26 +0000)
commitd73576818cf6b9e407067b1aabe7e6b3c555dd3c
tree58a7608414858d990b7fd969a4b3171f65f2b7e0
parent92f78c966a0d71bb2736212a39993fb65d8d7004
ARM: 8266/1: Remove early stack deallocation from restore_user_regs

Currently restore_user_regs deallocates the SVC stack early in
its execution and relies on no exception being taken between
the deallocation and the registers being restored. The introduction
of a default FIQ handler that also uses the SVC stack breaks this
assumption and can result in corrupted register state.

This patch works around the problem by removing the early
stack deallocation and using r2 as a temporary instead. I have
not found a way to do this without introducing an extra mov
instruction to the macro.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/entry-header.S