uaccess_32.h 1006 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_X86_UACCESS_32_H
  3. #define _ASM_X86_UACCESS_32_H
  4. /*
  5. * User space memory access functions
  6. */
  7. #include <linux/string.h>
  8. #include <asm/asm.h>
  9. #include <asm/page.h>
  10. unsigned long __must_check __copy_user_ll
  11. (void *to, const void *from, unsigned long n);
  12. unsigned long __must_check __copy_from_user_ll_nocache_nozero
  13. (void *to, const void __user *from, unsigned long n);
  14. static __always_inline unsigned long __must_check
  15. raw_copy_to_user(void __user *to, const void *from, unsigned long n)
  16. {
  17. return __copy_user_ll((__force void *)to, from, n);
  18. }
  19. static __always_inline unsigned long
  20. raw_copy_from_user(void *to, const void __user *from, unsigned long n)
  21. {
  22. return __copy_user_ll(to, (__force const void *)from, n);
  23. }
  24. static __always_inline unsigned long
  25. __copy_from_user_inatomic_nocache(void *to, const void __user *from,
  26. unsigned long n)
  27. {
  28. return __copy_from_user_ll_nocache_nozero(to, from, n);
  29. }
  30. #endif /* _ASM_X86_UACCESS_32_H */