xref: /linux/arch/sparc/lib/NG4clear_page.S (revision bb9707077b4ee5f77bc9939b057ff8a0d410296f)
1/* NG4copy_page.S: Niagara-4 optimized clear page.
2 *
3 * Copyright (C) 2012 (davem@davemloft.net)
4 */
5
6#include <asm/asi.h>
7#include <asm/page.h>
8
9	.text
10
11	.register	%g3, #scratch
12
13	.align		32
14	.globl		NG4clear_page
15	.globl		NG4clear_user_page
16NG4clear_page:		/* %o0=dest */
17NG4clear_user_page:	/* %o0=dest, %o1=vaddr */
18	set		PAGE_SIZE, %g7
19	mov		0x20, %g3
201:	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