NGcopy_from_user.S 711 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* NGcopy_from_user.S: Niagara optimized copy from userspace.
  3. *
  4. * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
  5. */
  6. #define EX_LD(x,y) \
  7. 98: x; \
  8. .section __ex_table,"a";\
  9. .align 4; \
  10. .word 98b, y; \
  11. .text; \
  12. .align 4;
  13. #ifndef ASI_AIUS
  14. #define ASI_AIUS 0x11
  15. #endif
  16. #define FUNC_NAME NGcopy_from_user
  17. #define LOAD(type,addr,dest) type##a [addr] ASI_AIUS, dest
  18. #define LOAD_TWIN(addr_reg,dest0,dest1) \
  19. ldda [addr_reg] ASI_BLK_INIT_QUAD_LDD_AIUS, dest0
  20. #define EX_RETVAL(x) %g0
  21. #ifdef __KERNEL__
  22. #define PREAMBLE \
  23. rd %asi, %g1; \
  24. cmp %g1, ASI_AIUS; \
  25. bne,pn %icc, raw_copy_in_user; \
  26. nop
  27. #endif
  28. #include "NGmemcpy.S"