arm64: tls: Avoid unconditional zeroing of tpidrro_el0 for native tasks
authorWill Deacon <will.deacon@arm.com>
Tue, 14 Nov 2017 14:33:28 +0000 (14:33 +0000)
committerHaibo Chen <haibo.chen@nxp.com>
Thu, 12 Apr 2018 10:46:08 +0000 (18:46 +0800)
commit3ba7eee604f76f455b1471c0d0ff268ffac0b578
treefb830c73690a6c047c002a3d0e2d8573c0573ad7
parentc74f8361747884b916175aee7e1f91adac2e8a6c
arm64: tls: Avoid unconditional zeroing of tpidrro_el0 for native tasks

commit 18011eac28c7 upstream.

When unmapping the kernel at EL0, we use tpidrro_el0 as a scratch register
during exception entry from native tasks and subsequently zero it in
the kernel_ventry macro. We can therefore avoid zeroing tpidrro_el0
in the context-switch path for native tasks using the entry trampoline.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Conflicts:
fold tls_preserve_current_state() in arch/arm64/kernel/process.c
arch/arm64/kernel/process.c