U3copy_to_user.S 863 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* U3copy_to_user.S: UltraSparc-III optimized copy to userspace.
  3. *
  4. * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
  5. */
  6. #define EX_ST(x,y) \
  7. 98: x; \
  8. .section __ex_table,"a";\
  9. .align 4; \
  10. .word 98b, y; \
  11. .text; \
  12. .align 4;
  13. #define EX_ST_FP(x,y) \
  14. 98: x; \
  15. .section __ex_table,"a";\
  16. .align 4; \
  17. .word 98b, y##_fp; \
  18. .text; \
  19. .align 4;
  20. #define FUNC_NAME U3copy_to_user
  21. #define STORE(type,src,addr) type##a src, [addr] ASI_AIUS
  22. #define STORE_BLK(src,addr) stda src, [addr] ASI_BLK_AIUS
  23. #define EX_RETVAL(x) 0
  24. /* Writing to %asi is _expensive_ so we hardcode it.
  25. * Reading %asi to check for KERNEL_DS is comparatively
  26. * cheap.
  27. */
  28. #define PREAMBLE \
  29. rd %asi, %g1; \
  30. cmp %g1, ASI_AIUS; \
  31. bne,pn %icc, raw_copy_in_user; \
  32. nop; \
  33. #include "U3memcpy.S"