Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ASM_X86_UACCESS_32_H
0003 #define _ASM_X86_UACCESS_32_H
0004 
0005 /*
0006  * User space memory access functions
0007  */
0008 #include <linux/string.h>
0009 #include <asm/asm.h>
0010 #include <asm/page.h>
0011 
0012 unsigned long __must_check __copy_user_ll
0013         (void *to, const void *from, unsigned long n);
0014 unsigned long __must_check __copy_from_user_ll_nocache_nozero
0015         (void *to, const void __user *from, unsigned long n);
0016 
0017 static __always_inline unsigned long __must_check
0018 raw_copy_to_user(void __user *to, const void *from, unsigned long n)
0019 {
0020     return __copy_user_ll((__force void *)to, from, n);
0021 }
0022 
0023 static __always_inline unsigned long
0024 raw_copy_from_user(void *to, const void __user *from, unsigned long n)
0025 {
0026     return __copy_user_ll(to, (__force const void *)from, n);
0027 }
0028 
0029 static __always_inline unsigned long
0030 __copy_from_user_inatomic_nocache(void *to, const void __user *from,
0031                   unsigned long n)
0032 {
0033        return __copy_from_user_ll_nocache_nozero(to, from, n);
0034 }
0035 
0036 #endif /* _ASM_X86_UACCESS_32_H */