uaccess.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * User memory access support for Hexagon
  4. *
  5. * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  6. */
  7. #ifndef _ASM_UACCESS_H
  8. #define _ASM_UACCESS_H
  9. /*
  10. * User space memory access functions
  11. */
  12. #include <asm/sections.h>
  13. /*
  14. * When a kernel-mode page fault is taken, the faulting instruction
  15. * address is checked against a table of exception_table_entries.
  16. * Each entry is a tuple of the address of an instruction that may
  17. * be authorized to fault, and the address at which execution should
  18. * be resumed instead of the faulting instruction, so as to effect
  19. * a workaround.
  20. */
  21. /* Assembly somewhat optimized copy routines */
  22. unsigned long raw_copy_from_user(void *to, const void __user *from,
  23. unsigned long n);
  24. unsigned long raw_copy_to_user(void __user *to, const void *from,
  25. unsigned long n);
  26. #define INLINE_COPY_FROM_USER
  27. #define INLINE_COPY_TO_USER
  28. __kernel_size_t __clear_user_hexagon(void __user *dest, unsigned long count);
  29. #define __clear_user(a, s) __clear_user_hexagon((a), (s))
  30. #include <asm-generic/uaccess.h>
  31. #endif