U1copy_from_user.S 833 B

1234567891011121314151617181920212223242526272829303132333435363738
  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,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; \
  17. .text; \
  18. .align 4;
  19. #define FUNC_NAME ___copy_from_user
  20. #define LOAD(type,addr,dest) type##a [addr] %asi, dest
  21. #define LOAD_BLK(addr,dest) ldda [addr] ASI_BLK_AIUS, dest
  22. #define EX_RETVAL(x) 0
  23. /* Writing to %asi is _expensive_ so we hardcode it.
  24. * Reading %asi to check for KERNEL_DS is comparatively
  25. * cheap.
  26. */
  27. #define PREAMBLE \
  28. rd %asi, %g1; \
  29. cmp %g1, ASI_AIUS; \
  30. bne,pn %icc, ___copy_in_user; \
  31. nop; \
  32. #include "U1memcpy.S"