Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.16 34 lines 521 B view raw
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (C) 2024 ARM Limited 4 * 5 * Common helper functions for SVE and SME functionality. 6 */ 7 8#ifndef __SVE_HELPERS_H__ 9#define __SVE_HELPERS_H__ 10 11#include <stdbool.h> 12 13#define VLS_USE_SVE false 14#define VLS_USE_SME true 15 16extern unsigned int vls[]; 17extern unsigned int nvls; 18 19int sve_fill_vls(bool use_sme, int min_vls); 20 21static inline uint64_t get_svcr(void) 22{ 23 uint64_t val; 24 25 asm volatile ( 26 "mrs %0, S3_3_C4_C2_2\n" 27 : "=r"(val) 28 : 29 : "cc"); 30 31 return val; 32} 33 34#endif