arm64: process: Add tls_thread_restore_current()

This function restores the TPIDR_EL0 and TPIDRRO_EL0
registers from the current task.

This will be used when temporarily clobbering these two
registers during early kernel entry for dynamic stacks.

As we cannot use the stack to store anything if we get
an exception on the stack itself, we need some place
to stash away enough of the processor registers so
that we can switch to a temporary stack really early
in assembly entry.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 files changed