NGcopy_from_user.S 755 B

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