arm64: Store struct thread_info in sp_el0
authorJungseok Lee <jungseoklee85@gmail.com>
Fri, 4 Dec 2015 11:02:25 +0000 (11:02 +0000)
committerAlex Shi <alex.shi@linaro.org>
Wed, 11 May 2016 07:56:59 +0000 (15:56 +0800)
commitc0f49bdceea7d2f0cfe1c6f857e4e1cfa919382a
treeca2142fbeeea554b6091d2975a1eeee1ce158b0c
parenta5b499e62f4070c7bfe2d322516a937e6f48d04f
arm64: Store struct thread_info in sp_el0

There is need for figuring out how to manage struct thread_info data when
IRQ stack is introduced. struct thread_info information should be copied
to IRQ stack under the current thread_info calculation logic whenever
context switching is invoked. This is too expensive to keep supporting
the approach.

Instead, this patch pays attention to sp_el0 which is an unused scratch
register in EL1 context. sp_el0 utilization not only simplifies the
management, but also prevents text section size from being increased
largely due to static allocated IRQ stack as removing masking operation
using THREAD_SIZE in many places.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jungseok Lee <jungseoklee85@gmail.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 6cdf9c7ca687e01840d0215437620a20263012fc)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/include/asm/thread_info.h
arch/arm64/kernel/entry.S
arch/arm64/kernel/head.S
arch/arm64/kernel/sleep.S