aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/lib64
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-20 02:51:28 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-01-27 23:18:50 -0500
commit379a95d1d2c3e3682e380084c40b6fc01e38fa1f (patch)
tree663a232eaf663abe8e219c475dada42fd81fad4d /arch/sh/lib64
parentbcb28e42be8c1cce6cc523c1b656980011464016 (diff)
sh: Tidy up various clear_page()/copy_page() definitions.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/lib64')
-rw-r--r--arch/sh/lib64/page_clear.S4
-rw-r--r--arch/sh/lib64/page_copy.S56
2 files changed, 29 insertions, 31 deletions
diff --git a/arch/sh/lib64/page_clear.S b/arch/sh/lib64/page_clear.S
index ac0111d669a3..007ab48ecc1c 100644
--- a/arch/sh/lib64/page_clear.S
+++ b/arch/sh/lib64/page_clear.S
@@ -25,8 +25,8 @@
25 .little 25 .little
26 26
27 .balign 8 27 .balign 8
28 .global sh64_page_clear 28 .global clear_page
29sh64_page_clear: 29clear_page:
30 pta/l 1f, tr1 30 pta/l 1f, tr1
31 pta/l 2f, tr2 31 pta/l 2f, tr2
32 ptabs/l r18, tr0 32 ptabs/l r18, tr0
diff --git a/arch/sh/lib64/page_copy.S b/arch/sh/lib64/page_copy.S
index e159c3cd2582..0ec6fca63b56 100644
--- a/arch/sh/lib64/page_copy.S
+++ b/arch/sh/lib64/page_copy.S
@@ -10,8 +10,8 @@
10 of SH5-101 cut2 eval chip with Cayman board DDR memory. 10 of SH5-101 cut2 eval chip with Cayman board DDR memory.
11 11
12 Parameters: 12 Parameters:
13 r2 : source effective address (start of page) 13 r2 : destination effective address (start of page)
14 r3 : destination effective address (start of page) 14 r3 : source effective address (start of page)
15 15
16 Always copies 4096 bytes. 16 Always copies 4096 bytes.
17 17
@@ -27,10 +27,10 @@
27 .little 27 .little
28 28
29 .balign 8 29 .balign 8
30 .global sh64_page_copy 30 .global copy_page
31sh64_page_copy: 31copy_page:
32 32
33 /* Copy 4096 bytes worth of data from r2 to r3. 33 /* Copy 4096 bytes worth of data from r3 to r2.
34 Do prefetches 4 lines ahead. 34 Do prefetches 4 lines ahead.
35 Do alloco 2 lines ahead */ 35 Do alloco 2 lines ahead */
36 36
@@ -41,21 +41,21 @@ sh64_page_copy:
41 41
42#if 0 42#if 0
43 /* TAKum03020 */ 43 /* TAKum03020 */
44 ld.q r2, 0x00, r63 44 ld.q r3, 0x00, r63
45 ld.q r2, 0x20, r63 45 ld.q r3, 0x20, r63
46 ld.q r2, 0x40, r63 46 ld.q r3, 0x40, r63
47 ld.q r2, 0x60, r63 47 ld.q r3, 0x60, r63
48#endif 48#endif
49 alloco r3, 0x00 49 alloco r2, 0x00
50 synco ! TAKum03020 50 synco ! TAKum03020
51 alloco r3, 0x20 51 alloco r2, 0x20
52 synco ! TAKum03020 52 synco ! TAKum03020
53 53
54 movi 3968, r6 54 movi 3968, r6
55 add r3, r6, r6 55 add r2, r6, r6
56 addi r6, 64, r7 56 addi r6, 64, r7
57 addi r7, 64, r8 57 addi r7, 64, r8
58 sub r2, r3, r60 58 sub r3, r2, r60
59 addi r60, 8, r61 59 addi r60, 8, r61
60 addi r61, 8, r62 60 addi r61, 8, r62
61 addi r62, 8, r23 61 addi r62, 8, r23
@@ -67,25 +67,23 @@ sh64_page_copy:
671: 671:
68#if 0 68#if 0
69 /* TAKum03020 */ 69 /* TAKum03020 */
70 bge/u r3, r6, tr2 ! skip prefetch for last 4 lines 70 bge/u r2, r6, tr2 ! skip prefetch for last 4 lines
71 ldx.q r3, r22, r63 ! prefetch 4 lines hence 71 ldx.q r2, r22, r63 ! prefetch 4 lines hence
72#endif 72#endif
732: 732:
74 bge/u r3, r7, tr3 ! skip alloco for last 2 lines 74 bge/u r2, r7, tr3 ! skip alloco for last 2 lines
75 alloco r3, 0x40 ! alloc destination line 2 lines ahead 75 alloco r2, 0x40 ! alloc destination line 2 lines ahead
76 synco ! TAKum03020 76 synco ! TAKum03020
773: 773:
78 ldx.q r3, r60, r36 78 ldx.q r2, r60, r36
79 ldx.q r3, r61, r37 79 ldx.q r2, r61, r37
80 ldx.q r3, r62, r38 80 ldx.q r2, r62, r38
81 ldx.q r3, r23, r39 81 ldx.q r2, r23, r39
82 st.q r3, 0, r36 82 st.q r2, 0, r36
83 st.q r3, 8, r37 83 st.q r2, 8, r37
84 st.q r3, 16, r38 84 st.q r2, 16, r38
85 st.q r3, 24, r39 85 st.q r2, 24, r39
86 addi r3, 32, r3 86 addi r2, 32, r2
87 bgt/l r8, r3, tr1 87 bgt/l r8, r2, tr1
88 88
89 blink tr0, r63 ! return 89 blink tr0, r63 ! return
90
91