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