GENcopy_from_user.S 637 B

12345678910111213141516171819202122232425262728293031323334
  1. /* GENcopy_from_user.S: Generic sparc64 copy from userspace.
  2. *
  3. * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
  4. */
  5. #define EX_LD(x) \
  6. 98: x; \
  7. .section .fixup; \
  8. .align 4; \
  9. 99: retl; \
  10. mov 1, %o0; \
  11. .section __ex_table,"a";\
  12. .align 4; \
  13. .word 98b, 99b; \
  14. .text; \
  15. .align 4;
  16. #ifndef ASI_AIUS
  17. #define ASI_AIUS 0x11
  18. #endif
  19. #define FUNC_NAME GENcopy_from_user
  20. #define LOAD(type,addr,dest) type##a [addr] ASI_AIUS, dest
  21. #define EX_RETVAL(x) 0
  22. #ifdef __KERNEL__
  23. #define PREAMBLE \
  24. rd %asi, %g1; \
  25. cmp %g1, ASI_AIUS; \
  26. bne,pn %icc, memcpy_user_stub; \
  27. nop
  28. #endif
  29. #include "GENmemcpy.S"