]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: entry: preserve thread_info pointer in switch_to
authorArd Biesheuvel <ardb@kernel.org>
Wed, 24 Nov 2021 11:09:48 +0000 (12:09 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Mon, 6 Dec 2021 11:49:16 +0000 (12:49 +0100)
commit30136a3e7b7a205a692ec1f7de3f297be5d92ea9
treeff91d95c5492bbe7b61a0eaf4185a64c7aa353fb
parenta357ea348d43ea09e9e1740eea431e01dd8b9e1c
ARM: entry: preserve thread_info pointer in switch_to

Tweak the UP stack protector handling code so that the thread info
pointer is preserved in R7 until set_current is called. This is needed
for a subsequent patch that implements THREAD_INFO_IN_TASK and
set_current for UP as well.

This also means we will prefer the per-task protector on UP systems that
implement the thread ID registers, so tweak the preprocessor
conditionals to reflect this.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Marc Zyngier <maz@kernel.org>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
arch/arm/kernel/entry-armv.S