]> asedeno.scripts.mit.edu Git - linux.git/commit
arm64/sve: Backend logic for setting the vector length
authorDave Martin <Dave.Martin@arm.com>
Tue, 31 Oct 2017 15:51:08 +0000 (15:51 +0000)
committerWill Deacon <will.deacon@arm.com>
Fri, 3 Nov 2017 15:24:16 +0000 (15:24 +0000)
commit7582e22038a266444eb87bc07c372592ad647439
treef7f83b24d17a6bacacbeeb3273d81f0570c793c7
parent8cd969d28fd2848dbfd86f6954dbd71f394f55f3
arm64/sve: Backend logic for setting the vector length

This patch implements the core logic for changing a task's vector
length on request from userspace.  This will be used by the ptrace
and prctl frontends that are implemented in later patches.

The SVE architecture permits, but does not require, implementations
to support vector lengths that are not a power of two.  To handle
this, logic is added to check a requested vector length against a
possibly sparse bitmap of available vector lengths at runtime, so
that the best supported value can be chosen.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/fpsimd.h
arch/arm64/kernel/fpsimd.c
include/uapi/linux/prctl.h