NGcopy_from_user.S 671 B

123456789101112131415161718192021222324252627282930313233
  1. /* NGcopy_from_user.S: Niagara optimized copy from userspace.
  2. *
  3. * Copyright (C) 2006, 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. #ifndef ASI_AIUS
  13. #define ASI_AIUS 0x11
  14. #endif
  15. #define FUNC_NAME NGcopy_from_user
  16. #define LOAD(type,addr,dest) type##a [addr] ASI_AIUS, dest
  17. #define LOAD_TWIN(addr_reg,dest0,dest1) \
  18. ldda [addr_reg] ASI_BLK_INIT_QUAD_LDD_AIUS, dest0
  19. #define EX_RETVAL(x) %g0
  20. #ifdef __KERNEL__
  21. #define PREAMBLE \
  22. rd %asi, %g1; \
  23. cmp %g1, ASI_AIUS; \
  24. bne,pn %icc, ___copy_in_user; \
  25. nop
  26. #endif
  27. #include "NGmemcpy.S"