Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* NG4copy_page.S: Niagara-4 optimized clear page.
0003  *
0004  * Copyright (C) 2012 (davem@davemloft.net)
0005  */
0006 
0007 #include <asm/asi.h>
0008 #include <asm/page.h>
0009 
0010     .text
0011 
0012     .register   %g3, #scratch
0013 
0014     .align      32
0015     .globl      NG4clear_page
0016     .globl      NG4clear_user_page
0017 NG4clear_page:      /* %o0=dest */
0018 NG4clear_user_page: /* %o0=dest, %o1=vaddr */
0019     set     PAGE_SIZE, %g7
0020     mov     0x20, %g3
0021 1:  stxa        %g0, [%o0 + %g0] ASI_ST_BLKINIT_MRU_P
0022     subcc       %g7, 0x40, %g7
0023     stxa        %g0, [%o0 + %g3] ASI_ST_BLKINIT_MRU_P
0024     bne,pt      %xcc, 1b
0025      add        %o0, 0x40, %o0
0026     membar      #StoreLoad|#StoreStore
0027     retl
0028      nop
0029     .size       NG4clear_page,.-NG4clear_page
0030     .size       NG4clear_user_page,.-NG4clear_user_page