U1copy_from_user.S 720 B

123456789101112131415161718192021222324252627282930
  1. /* U1copy_from_user.S: UltraSparc-I/II/IIi/IIe optimized copy from userspace.
  2. *
  3. * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
  4. */
  5. #define EX_LD(x) \
  6. 98: x; \
  7. .section __ex_table,"a";\
  8. .align 4; \
  9. .word 98b, __retl_one; \
  10. .text; \
  11. .align 4;
  12. #define FUNC_NAME ___copy_from_user
  13. #define LOAD(type,addr,dest) type##a [addr] %asi, dest
  14. #define LOAD_BLK(addr,dest) ldda [addr] ASI_BLK_AIUS, dest
  15. #define EX_RETVAL(x) 0
  16. /* Writing to %asi is _expensive_ so we hardcode it.
  17. * Reading %asi to check for KERNEL_DS is comparatively
  18. * cheap.
  19. */
  20. #define PREAMBLE \
  21. rd %asi, %g1; \
  22. cmp %g1, ASI_AIUS; \
  23. bne,pn %icc, ___copy_in_user; \
  24. nop; \
  25. #include "U1memcpy.S"