1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_BOOK3S_64_KUP_RADIX_H
3 #define _ASM_POWERPC_BOOK3S_64_KUP_RADIX_H
4 #include <linux/jump_label.h>
6 DECLARE_STATIC_KEY_FALSE(uaccess_flush_key);
8 /* Prototype for function defined in exceptions-64s.S */
9 void do_uaccess_flush(void);
11 static __always_inline void allow_user_access(void __user *to, const void __user *from,
16 static inline void prevent_user_access(void __user *to, const void __user *from,
19 if (static_branch_unlikely(&uaccess_flush_key))
23 #endif /* _ASM_POWERPC_BOOK3S_64_KUP_RADIX_H */