|
@@ -16,13 +16,15 @@
|
|
|
#ifndef __ASM_FP_H
|
|
|
#define __ASM_FP_H
|
|
|
|
|
|
-#include <asm/ptrace.h>
|
|
|
#include <asm/errno.h>
|
|
|
+#include <asm/ptrace.h>
|
|
|
#include <asm/processor.h>
|
|
|
#include <asm/sigcontext.h>
|
|
|
+#include <asm/sysreg.h>
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
|
+#include <linux/build_bug.h>
|
|
|
#include <linux/cache.h>
|
|
|
#include <linux/init.h>
|
|
|
#include <linux/stddef.h>
|
|
@@ -102,6 +104,16 @@ extern int sve_set_vector_length(struct task_struct *task,
|
|
|
extern int sve_set_current_vl(unsigned long arg);
|
|
|
extern int sve_get_current_vl(void);
|
|
|
|
|
|
+static inline void sve_user_disable(void)
|
|
|
+{
|
|
|
+ sysreg_clear_set(cpacr_el1, CPACR_EL1_ZEN_EL0EN, 0);
|
|
|
+}
|
|
|
+
|
|
|
+static inline void sve_user_enable(void)
|
|
|
+{
|
|
|
+ sysreg_clear_set(cpacr_el1, 0, CPACR_EL1_ZEN_EL0EN);
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* Probing and setup functions.
|
|
|
* Calls to these functions must be serialised with one another.
|
|
@@ -128,6 +140,9 @@ static inline int sve_get_current_vl(void)
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
+static inline void sve_user_disable(void) { BUILD_BUG(); }
|
|
|
+static inline void sve_user_enable(void) { BUILD_BUG(); }
|
|
|
+
|
|
|
static inline void sve_init_vq_map(void) { }
|
|
|
static inline void sve_update_vq_map(void) { }
|
|
|
static inline int sve_verify_vq_map(void) { return 0; }
|