1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_KUP_H_
3 #define _ASM_POWERPC_KUP_H_
7 #include <asm/pgtable.h>
9 #ifdef CONFIG_PPC_BOOK3S_64
10 #include <asm/book3s/64/kup-radix.h>
12 static inline void allow_user_access(void __user *to, const void __user *from,
13 unsigned long size) { }
14 static inline void prevent_user_access(void __user *to, const void __user *from,
15 unsigned long size) { }
16 #endif /* CONFIG_PPC_BOOK3S_64 */
18 static inline void allow_read_from_user(const void __user *from, unsigned long size)
20 allow_user_access(NULL, from, size);
23 static inline void allow_write_to_user(void __user *to, unsigned long size)
25 allow_user_access(to, NULL, size);
28 static inline void prevent_read_from_user(const void __user *from, unsigned long size)
30 prevent_user_access(NULL, from, size);
33 static inline void prevent_write_to_user(void __user *to, unsigned long size)
35 prevent_user_access(to, NULL, size);
38 #endif /* !__ASSEMBLY__ */
40 #endif /* _ASM_POWERPC_KUP_H_ */