]> git.baikalelectronics.ru Git - kernel.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)
commit2421c787d736ae2ce607dca7b2d4c42938126dc5
treef7f83b24d17a6bacacbeeb3273d81f0570c793c7
parent6a4b895f8191d9372bd3d6e41c7e433a3c97b482
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