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)
commita18f36453e0788d2d285a62b85c7c668ec119a64
tree58a7608414858d990b7fd969a4b3171f65f2b7e0
parent1e3479225acbb7ae048ac30fb7c6090fa7f0df02
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