NG2copy_from_user.S 703 B

123456789101112131415161718192021222324252627282930313233343536
  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) \
  6. 98: x; \
  7. .section __ex_table,"a";\
  8. .align 4; \
  9. .word 98b, __retl_one_asi;\
  10. .text; \
  11. .align 4;
  12. #ifndef ASI_AIUS
  13. #define ASI_AIUS 0x11
  14. #endif
  15. #ifndef ASI_BLK_AIUS_4V
  16. #define ASI_BLK_AIUS_4V 0x17
  17. #endif
  18. #define FUNC_NAME NG2copy_from_user
  19. #define LOAD(type,addr,dest) type##a [addr] %asi, dest
  20. #define LOAD_BLK(addr,dest) ldda [addr] ASI_BLK_AIUS_4V, 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, ___copy_in_user; \
  27. nop
  28. #endif
  29. #include "NG2memcpy.S"