diff options
author | Mark Rutland <mark.rutland@arm.com> | 2021-05-20 12:50:29 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-05-26 22:45:46 +0100 |
commit | 3305e7f74a14cdb19e61af4febb098ad62820d71 (patch) | |
tree | c8992d93c399b449249b77afe6f49d01f0a9d4bf /arch/arm64/kernel/head.S | |
parent | 98c7a1666ee94af59a65f2787a887a05a546d163 (diff) | |
download | linux-3305e7f74a14cdb19e61af4febb098ad62820d71.tar.bz2 |
arm64: smp: remove stack from secondary_data
When we boot a secondary CPU, we pass it a task and a stack to use. As
the stack is always the task's stack, which can be derived from the
task, let's have the secondary CPU derive this itself and avoid passing
redundant information.
There should be no functional change as a result of this patch.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20210520115031.18509-5-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/head.S')
-rw-r--r-- | arch/arm64/kernel/head.S | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index cc2d45d54838..9be95e11367d 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -645,11 +645,12 @@ SYM_FUNC_START_LOCAL(__secondary_switched) isb adr_l x0, secondary_data - ldr x1, [x0, #CPU_BOOT_STACK] // get secondary_data.stack - cbz x1, __secondary_too_slow - mov sp, x1 ldr x2, [x0, #CPU_BOOT_TASK] cbz x2, __secondary_too_slow + + ldr x1, [x2, #TSK_STACK] + add sp, x1, #THREAD_SIZE + msr sp_el0, x2 scs_load x2, x3 setup_final_frame |