NG2copy_from_user.S 817 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* NG2copy_from_user.S: Niagara-2 optimized copy from userspace.
  2. *
  3. * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
  4. */
  5. #define EX_LD(x,y) \
  6. 98: x; \
  7. .section __ex_table,"a";\
  8. .align 4; \
  9. .word 98b, y; \
  10. .text; \
  11. .align 4;
  12. #define EX_LD_FP(x,y) \
  13. 98: x; \
  14. .section __ex_table,"a";\
  15. .align 4; \
  16. .word 98b, y##_fp; \
  17. .text; \
  18. .align 4;
  19. #ifndef ASI_AIUS
  20. #define ASI_AIUS 0x11
  21. #endif
  22. #ifndef ASI_BLK_AIUS_4V
  23. #define ASI_BLK_AIUS_4V 0x17
  24. #endif
  25. #define FUNC_NAME NG2copy_from_user
  26. #define LOAD(type,addr,dest) type##a [addr] %asi, dest
  27. #define LOAD_BLK(addr,dest) ldda [addr] ASI_BLK_AIUS_4V, dest
  28. #define EX_RETVAL(x) 0
  29. #ifdef __KERNEL__
  30. #define PREAMBLE \
  31. rd %asi, %g1; \
  32. cmp %g1, ASI_AIUS; \
  33. bne,pn %icc, ___copy_in_user; \
  34. nop
  35. #endif
  36. #include "NG2memcpy.S"