]> www.infradead.org Git - users/dwmw2/linux.git/commit
arm64/gcs: Add manual encodings of GCS instructions
authorMark Brown <broonie@kernel.org>
Tue, 1 Oct 2024 22:58:48 +0000 (23:58 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 4 Oct 2024 11:04:34 +0000 (12:04 +0100)
commitdad947cc22cff28348d04e21fa4d6c882385fd7d
treeeb622b84387fcd5e014e0a17c98158c6f69a9640
parentce0641d48ddd240053138ce55c3423f833a4237b
arm64/gcs: Add manual encodings of GCS instructions

Define C callable functions for GCS instructions used by the kernel. In
order to avoid ambitious toolchain requirements for GCS support these are
manually encoded, this means we have fixed register numbers which will be
a bit limiting for the compiler but none of these should be used in
sufficiently fast paths for this to be a problem.

Note that GCSSTTR is used to store to EL0.

Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241001-arm64-gcs-v13-9-222b78d87eee@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/gcs.h [new file with mode: 0644]
arch/arm64/include/asm/uaccess.h