]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/sve: In-kernel vector length availability query interface
authorDave Martin <Dave.Martin@arm.com>
Fri, 28 Sep 2018 13:39:21 +0000 (14:39 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 29 Mar 2019 14:41:54 +0000 (14:41 +0000)
commit90fc14a73857d14dfd3d9eaf0daeb0ce6f7b6aaf
treef4c9958e218eee29e80cd3e7de44699cf2e0d44f
parenta64dbf98c185eac55c62bd7ed14064884de93ad2
arm64/sve: In-kernel vector length availability query interface

KVM will need to interrogate the set of SVE vector lengths
available on the system.

This patch exposes the relevant bits to the kernel, along with a
sve_vq_available() helper to check whether a particular vector
length is supported.

__vq_to_bit() and __bit_to_vq() are not intended for use outside
these functions: now that these are exposed outside fpsimd.c, they
are prefixed with __ in order to provide an extra hint that they
are not intended for general-purpose use.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: zhang.lei <zhang.lei@jp.fujitsu.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/fpsimd.h
arch/arm64/kernel/fpsimd.c