]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/sme: Implement support for TPIDR2
authorMark Brown <broonie@kernel.org>
Tue, 19 Apr 2022 11:22:20 +0000 (12:22 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 22 Apr 2022 17:50:56 +0000 (18:50 +0100)
commitb468b2e130dcbae37883b6303f58ea3f6addc6ec
tree81c8321997d8a30a9c2ec1e45687fbcfc5554818
parent3f98a39b5553799cc302ab86b256c8d8bfc017ca
arm64/sme: Implement support for TPIDR2

The Scalable Matrix Extension introduces support for a new thread specific
data register TPIDR2 intended for use by libc. The kernel must save the
value of TPIDR2 on context switch and should ensure that all new threads
start off with a default value of 0. Add a field to the thread_struct to
store TPIDR2 and context switch it with the other thread specific data.

In case there are future extensions which also use TPIDR2 we introduce
system_supports_tpidr2() and use that rather than system_supports_sme()
for TPIDR2 handling.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220419112247.711548-13-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cpufeature.h
arch/arm64/include/asm/processor.h
arch/arm64/kernel/fpsimd.c
arch/arm64/kernel/process.c