aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r/mm/page.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/m32r/mm/page.S
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/m32r/mm/page.S')
-rw-r--r--arch/m32r/mm/page.S82
1 files changed, 82 insertions, 0 deletions
diff --git a/arch/m32r/mm/page.S b/arch/m32r/mm/page.S
new file mode 100644
index 000000000000..a2e9367dbf79
--- /dev/null
+++ b/arch/m32r/mm/page.S
@@ -0,0 +1,82 @@
1/*
2 * linux/arch/m32r/mm/page.S
3 *
4 * Clear/Copy page with CPU
5 *
6 * Copyright (C) 2004 The Free Software Initiative of Japan
7 *
8 * Written by Niibe Yutaka
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file "COPYING" in the main directory of this archive
12 * for more details.
13 *
14 */
15 .text
16 .global copy_page
17 /*
18 * copy_page (to, from)
19 *
20 * PAGE_SIZE = 4096-byte
21 * Cache line = 16-byte
22 * 16 * 256
23 */
24 .align 4
25copy_page:
26 ldi r2, #255
27 ld r3, @r0 /* cache line allocate */
28 ld r4, @r1+
29 ld r5, @r1+
30 ld r6, @r1+
31 ld r7, @r1+
32 .fillinsn
330:
34 st r4, @r0
35 st r5, @+r0
36 st r6, @+r0
37 st r7, @+r0
38 ld r4, @r1+
39 addi r0, #4
40 ld r5, @r1+
41 ld r6, @r1+
42 ld r7, @r1+
43 ld r3, @r0 /* cache line allocate */
44 addi r2, #-1
45 bnez r2, 0b
46
47 st r4, @r0
48 st r5, @+r0
49 st r6, @+r0
50 st r7, @+r0
51 jmp r14
52
53 .text
54 .global clear_page
55 /*
56 * clear_page (to)
57 *
58 * PAGE_SIZE = 4096-byte
59 * Cache line = 16-byte
60 * 16 * 256
61 */
62 .align 4
63clear_page:
64 ldi r2, #255
65 ldi r4, #0
66 ld r3, @r0 /* cache line allocate */
67 .fillinsn
680:
69 st r4, @r0
70 st r4, @+r0
71 st r4, @+r0
72 st r4, @+r0
73 addi r0, #4
74 ld r3, @r0 /* cache line allocate */
75 addi r2, #-1
76 bnez r2, 0b
77
78 st r4, @r0
79 st r4, @+r0
80 st r4, @+r0
81 st r4, @+r0
82 jmp r14