sme_vl
static inline size_t __sve_state_size(unsigned int sve_vl, unsigned int sme_vl)
unsigned int vl = max(sve_vl, sme_vl);
unsigned int sme_vl = task_get_sme_vl(task);
return __sve_state_size(sve_vl, sme_vl);
static inline size_t __sve_state_size(unsigned int sve_vl, unsigned int sme_vl)
static inline size_t __sme_state_size(unsigned int sme_vl)
size_t size = ZA_SIG_REGS_SIZE(sve_vq_from_vl(sme_vl));
static inline size_t __sme_state_size(unsigned int sme_vl)
unsigned int sme_vl;
last->sme_vl = task_get_sme_vl(current);
unsigned long sme_vl = task_get_sme_vl(current);
sme_set_vq(sve_vq_from_vl(sme_vl) - 1);
vl = last->sme_vl;
unsigned int sme_vl = task_get_sme_vl(task);
sme_vl = vl;
sve_state = kzalloc(__sve_state_size(sve_vl, sme_vl), GFP_KERNEL);
sme_state = kzalloc(__sme_state_size(sme_vl), GFP_KERNEL);
static int check_fpr(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static void setup_z(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static int check_z(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static void setup_p(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static int check_p(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static void setup_ffr(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static int check_ffr(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static void setup_svcr(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static int check_svcr(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static void setup_za(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static int check_za(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
size_t reg_size = sme_vl * sme_vl;
ksft_print_msg("SME VL %d ZA does not match\n", sme_vl);
static void setup_zt(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static int check_zt(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
ksft_print_msg("SME VL %d ZT does not match\n", sme_vl);
typedef void (*setup_fn)(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
typedef int (*check_fn)(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
extern void do_syscall(int sve_vl, int sme_vl);
static bool do_test(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
regset[i].setup(cfg, sve_vl, sme_vl, svcr);
do_syscall(sve_vl, sme_vl);
errors += regset[i].check(cfg, sve_vl, sme_vl, svcr);
static void setup_gpr(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
static int check_gpr(struct syscall_cfg *cfg, int sve_vl, int sme_vl, uint64_t svcr)
static void setup_fpr(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
za.vl = sme_vl;
za_in.vl = sme_vl;
if (za_out->vl != sme_vl) {
sme_vl, za_out->vl);
static int sme_vl;
sme_vl = prctl(PR_SME_GET_VL);
if (sme_vl == -1) {
.run = sme_vl,