]> 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)
commit633f54fb64c1d5b6ff51a0ae90db2275869cd48a
tree58a7608414858d990b7fd969a4b3171f65f2b7e0
parentce45ef7b150b5445757f17b9fb56832bb175e363
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