1
2 #include <linux/linkage.h>
3 #include <asm/export.h>
4
5
6
7
8
9
10
11
12
13
14
15
16 ENTRY(clear_page_rep)
17 movl $4096/8,%ecx
18 xorl %eax,%eax
19 rep stosq
20 ret
21 ENDPROC(clear_page_rep)
22 EXPORT_SYMBOL_GPL(clear_page_rep)
23
24 ENTRY(clear_page_orig)
25 xorl %eax,%eax
26 movl $4096/64,%ecx
27 .p2align 4
28 .Lloop:
29 decl %ecx
30 #define PUT(x) movq %rax,x*8(%rdi)
31 movq %rax,(%rdi)
32 PUT(1)
33 PUT(2)
34 PUT(3)
35 PUT(4)
36 PUT(5)
37 PUT(6)
38 PUT(7)
39 leaq 64(%rdi),%rdi
40 jnz .Lloop
41 nop
42 ret
43 ENDPROC(clear_page_orig)
44 EXPORT_SYMBOL_GPL(clear_page_orig)
45
46 ENTRY(clear_page_erms)
47 movl $4096,%ecx
48 xorl %eax,%eax
49 rep stosb
50 ret
51 ENDPROC(clear_page_erms)
52 EXPORT_SYMBOL_GPL(clear_page_erms)