Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux/fpc-iii.git] / arch / sparc / lib / NG4clear_page.S
blobe16c88204a42bce03447fb9526c223feba1c368a
1 /* NG4copy_page.S: Niagara-4 optimized clear page.
2  *
3  * Copyright (C) 2012 (davem@davemloft.net)
4  */
6 #include <asm/asi.h>
7 #include <asm/page.h>
9         .text
11         .register       %g3, #scratch
13         .align          32
14         .globl          NG4clear_page
15         .globl          NG4clear_user_page
16 NG4clear_page:          /* %o0=dest */
17 NG4clear_user_page:     /* %o0=dest, %o1=vaddr */
18         set             PAGE_SIZE, %g7
19         mov             0x20, %g3
20 1:      stxa            %g0, [%o0 + %g0] ASI_ST_BLKINIT_MRU_P
21         subcc           %g7, 0x40, %g7
22         stxa            %g0, [%o0 + %g3] ASI_ST_BLKINIT_MRU_P
23         bne,pt          %xcc, 1b
24          add            %o0, 0x40, %o0
25         membar          #StoreLoad|#StoreStore
26         retl
27          nop
28         .size           NG4clear_page,.-NG4clear_page
29         .size           NG4clear_user_page,.-NG4clear_user_page