]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
arm64: scs: Remove redundant save/restore of SCS SP on entry to/from EL0
authorWill Deacon <will@kernel.org>
Fri, 13 Mar 2026 12:32:19 +0000 (12:32 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 13 Mar 2026 17:17:58 +0000 (17:17 +0000)
commit3ce8f5860ff478d23af87bd459e76e466b483af3
tree0f2aecbeb87f2a9f5ca29f1beb9af2bb4580e26d
parent6712fcde003f780d6241d755a0fa41ff4739b9a4
arm64: scs: Remove redundant save/restore of SCS SP on entry to/from EL0

When returning to userspace, the SCS is empty and so the SCS SP just
points to the base address of the SCS page.

Rather than saving and restoring this address in the current task, we
can simply restore the SCS SP to point at the base of the stack on entry
to EL1 from EL0.

Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/scs.h
arch/arm64/kernel/entry.S