1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _UAPI__ASM_SVE_CONTEXT_H 20 #define _UAPI__ASM_SVE_CONTEXT_H 21 #include <linux/types.h> 22 #define __SVE_VQ_BYTES 16 23 #define __SVE_VQ_MIN 1 24 #define __SVE_VQ_MAX 512 25 #define __SVE_VL_MIN (__SVE_VQ_MIN * __SVE_VQ_BYTES) 26 #define __SVE_VL_MAX (__SVE_VQ_MAX * __SVE_VQ_BYTES) 27 #define __SVE_NUM_ZREGS 32 28 #define __SVE_NUM_PREGS 16 29 #define __sve_vl_valid(vl) ((vl) % __SVE_VQ_BYTES == 0 && (vl) >= __SVE_VL_MIN && (vl) <= __SVE_VL_MAX) 30 #define __sve_vq_from_vl(vl) ((vl) / __SVE_VQ_BYTES) 31 #define __sve_vl_from_vq(vq) ((vq) * __SVE_VQ_BYTES) 32 #define __SVE_ZREG_SIZE(vq) ((__u32) (vq) * __SVE_VQ_BYTES) 33 #define __SVE_PREG_SIZE(vq) ((__u32) (vq) * (__SVE_VQ_BYTES / 8)) 34 #define __SVE_FFR_SIZE(vq) __SVE_PREG_SIZE(vq) 35 #define __SVE_ZREGS_OFFSET 0 36 #define __SVE_ZREG_OFFSET(vq,n) (__SVE_ZREGS_OFFSET + __SVE_ZREG_SIZE(vq) * (n)) 37 #define __SVE_ZREGS_SIZE(vq) (__SVE_ZREG_OFFSET(vq, __SVE_NUM_ZREGS) - __SVE_ZREGS_OFFSET) 38 #define __SVE_PREGS_OFFSET(vq) (__SVE_ZREGS_OFFSET + __SVE_ZREGS_SIZE(vq)) 39 #define __SVE_PREG_OFFSET(vq,n) (__SVE_PREGS_OFFSET(vq) + __SVE_PREG_SIZE(vq) * (n)) 40 #define __SVE_PREGS_SIZE(vq) (__SVE_PREG_OFFSET(vq, __SVE_NUM_PREGS) - __SVE_PREGS_OFFSET(vq)) 41 #define __SVE_FFR_OFFSET(vq) (__SVE_PREGS_OFFSET(vq) + __SVE_PREGS_SIZE(vq)) 42 #endif 43