NG4clear_page.S 682 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* NG4copy_page.S: Niagara-4 optimized clear page.
  3. *
  4. * Copyright (C) 2012 (davem@davemloft.net)
  5. */
  6. #include <asm/asi.h>
  7. #include <asm/page.h>
  8. .text
  9. .register %g3, #scratch
  10. .align 32
  11. .globl NG4clear_page
  12. .globl NG4clear_user_page
  13. NG4clear_page: /* %o0=dest */
  14. NG4clear_user_page: /* %o0=dest, %o1=vaddr */
  15. set PAGE_SIZE, %g7
  16. mov 0x20, %g3
  17. 1: stxa %g0, [%o0 + %g0] ASI_ST_BLKINIT_MRU_P
  18. subcc %g7, 0x40, %g7
  19. stxa %g0, [%o0 + %g3] ASI_ST_BLKINIT_MRU_P
  20. bne,pt %xcc, 1b
  21. add %o0, 0x40, %o0
  22. membar #StoreLoad|#StoreStore
  23. retl
  24. nop
  25. .size NG4clear_page,.-NG4clear_page
  26. .size NG4clear_user_page,.-NG4clear_user_page