diff options
author | Dave Martin <Dave.Martin@arm.com> | 2017-10-31 15:51:08 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-11-03 15:24:16 +0000 |
commit | 7582e22038a266444eb87bc07c372592ad647439 (patch) | |
tree | f7f83b24d17a6bacacbeeb3273d81f0570c793c7 /include/uapi/linux/prctl.h | |
parent | 8cd969d28fd2848dbfd86f6954dbd71f394f55f3 (diff) | |
download | lwn-7582e22038a266444eb87bc07c372592ad647439.tar.gz lwn-7582e22038a266444eb87bc07c372592ad647439.zip |
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>
Diffstat (limited to 'include/uapi/linux/prctl.h')
-rw-r--r-- | include/uapi/linux/prctl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h index a8d0759a9e40..1b64901ca6b3 100644 --- a/include/uapi/linux/prctl.h +++ b/include/uapi/linux/prctl.h @@ -197,4 +197,9 @@ struct prctl_mm_map { # define PR_CAP_AMBIENT_LOWER 3 # define PR_CAP_AMBIENT_CLEAR_ALL 4 +/* arm64 Scalable Vector Extension controls */ +# define PR_SVE_SET_VL_ONEXEC (1 << 18) /* defer effect until exec */ +# define PR_SVE_VL_LEN_MASK 0xffff +# define PR_SVE_VL_INHERIT (1 << 17) /* inherit across exec */ + #endif /* _LINUX_PRCTL_H */ |