]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: scs: Store absolute SCS stack pointer value in thread_info
authorWill Deacon <will@kernel.org>
Fri, 15 May 2020 13:11:05 +0000 (14:11 +0100)
committerWill Deacon <will@kernel.org>
Mon, 18 May 2020 16:47:22 +0000 (17:47 +0100)
commit7596b557da9ccbc32ebdab90fa2d56ac16bdb0e5
treec06448db0ce33c2d4a5ae1494806a3b81082aa96
parent65ef9d7c7bd661f994c1c6cd03d8c00b971b2fb8
arm64: scs: Store absolute SCS stack pointer value in thread_info

Storing the SCS information in thread_info as a {base,offset} pair
introduces an additional load instruction on the ret-to-user path,
since the SCS stack pointer in x18 has to be converted back to an offset
by subtracting the base.

Replace the offset with the absolute SCS stack pointer value instead
and avoid the redundant load.

Tested-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/scs.h
arch/arm64/include/asm/thread_info.h
arch/arm64/kernel/asm-offsets.c
include/linux/scs.h
kernel/scs.c