summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-20 16:51:28 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-01-28 13:18:50 +0900
commit379a95d1d2c3e3682e380084c40b6fc01e38fa1f (patch)
tree663a232eaf663abe8e219c475dada42fd81fad4d /arch
parentbcb28e42be8c1cce6cc523c1b656980011464016 (diff)
sh: Tidy up various clear_page()/copy_page() definitions.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/lib64/page_clear.S4
-rw-r--r--arch/sh/lib64/page_copy.S56
-rw-r--r--arch/sh/mm/copy_page.S6
-rw-r--r--arch/sh/mm/init.c15
-rw-r--r--arch/sh/mm/pg-nommu.c4
5 files changed, 34 insertions, 51 deletions
diff --git a/arch/sh/lib64/page_clear.S b/arch/sh/lib64/page_clear.S
index ac0111d669a..007ab48ecc1 100644
--- a/arch/sh/lib64/page_clear.S
+++ b/arch/sh/lib64/page_clear.S
@@ -25,8 +25,8 @@
.little
.balign 8
- .global sh64_page_clear
-sh64_page_clear:
+ .global clear_page
+clear_page:
pta/l 1f, tr1
pta/l 2f, tr2
ptabs/l r18, tr0
diff --git a/arch/sh/lib64/page_copy.S b/arch/sh/lib64/page_copy.S
index e159c3cd258..0ec6fca63b5 100644
--- a/arch/sh/lib64/page_copy.S
+++ b/arch/sh/lib64/page_copy.S
@@ -10,8 +10,8 @@
of SH5-101 cut2 eval chip with Cayman board DDR memory.
Parameters:
- r2 : source effective address (start of page)
- r3 : destination effective address (start of page)
+ r2 : destination effective address (start of page)
+ r3 : source effective address (start of page)
Always copies 4096 bytes.
@@ -27,10 +27,10 @@
.little
.balign 8
- .global sh64_page_copy
-sh64_page_copy:
+ .global copy_page
+copy_page:
- /* Copy 4096 bytes worth of data from r2 to r3.
+ /* Copy 4096 bytes worth of data from r3 to r2.
Do prefetches 4 lines ahead.
Do alloco 2 lines ahead */
@@ -41,21 +41,21 @@ sh64_page_copy:
#if 0
/* TAKum03020 */
- ld.q r2, 0x00, r63
- ld.q r2, 0x20, r63
- ld.q r2, 0x40, r63
- ld.q r2, 0x60, r63
+ ld.q r3, 0x00, r63
+ ld.q r3, 0x20, r63
+ ld.q r3, 0x40, r63
+ ld.q r3, 0x60, r63
#endif
- alloco r3, 0x00
+ alloco r2, 0x00
synco ! TAKum03020
- alloco r3, 0x20
+ alloco r2, 0x20
synco ! TAKum03020
movi 3968, r6
- add r3, r6, r6
+ add r2, r6, r6
addi r6, 64, r7
addi r7, 64, r8
- sub r2, r3, r60
+ sub r3, r2, r60
addi r60, 8, r61
addi r61, 8, r62
addi r62, 8, r23
@@ -67,25 +67,23 @@ sh64_page_copy:
1:
#if 0
/* TAKum03020 */
- bge/u r3, r6, tr2 ! skip prefetch for last 4 lines
- ldx.q r3, r22, r63 ! prefetch 4 lines hence
+ bge/u r2, r6, tr2 ! skip prefetch for last 4 lines
+ ldx.q r2, r22, r63 ! prefetch 4 lines hence
#endif
2:
- bge/u r3, r7, tr3 ! skip alloco for last 2 lines
- alloco r3, 0x40 ! alloc destination line 2 lines ahead
+ bge/u r2, r7, tr3 ! skip alloco for last 2 lines
+ alloco r2, 0x40 ! alloc destination line 2 lines ahead
synco ! TAKum03020
3:
- ldx.q r3, r60, r36
- ldx.q r3, r61, r37
- ldx.q r3, r62, r38
- ldx.q r3, r23, r39
- st.q r3, 0, r36
- st.q r3, 8, r37
- st.q r3, 16, r38
- st.q r3, 24, r39
- addi r3, 32, r3
- bgt/l r8, r3, tr1
+ ldx.q r2, r60, r36
+ ldx.q r2, r61, r37
+ ldx.q r2, r62, r38
+ ldx.q r2, r23, r39
+ st.q r2, 0, r36
+ st.q r2, 8, r37
+ st.q r2, 16, r38
+ st.q r2, 24, r39
+ addi r2, 32, r2
+ bgt/l r8, r2, tr1
blink tr0, r63 ! return
-
-
diff --git a/arch/sh/mm/copy_page.S b/arch/sh/mm/copy_page.S
index 40685018b95..b879545fa28 100644
--- a/arch/sh/mm/copy_page.S
+++ b/arch/sh/mm/copy_page.S
@@ -9,11 +9,11 @@
#include <asm/page.h>
/*
- * copy_page_slow
+ * copy_page
* @to: P1 address
* @from: P1 address
*
- * void copy_page_slow(void *to, void *from)
+ * void copy_page(void *to, void *from)
*/
/*
@@ -23,7 +23,7 @@
* r10 --- to
* r11 --- from
*/
-ENTRY(copy_page_slow)
+ENTRY(copy_page)
mov.l r8,@-r15
mov.l r10,@-r15
mov.l r11,@-r15
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 5d19c8c7ab5..79c309780f9 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -24,9 +24,6 @@
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
pgd_t swapper_pg_dir[PTRS_PER_PGD];
-void (*copy_page)(void *from, void *to);
-void (*clear_page)(void *to);
-
void show_mem(void)
{
int total = 0, reserved = 0, free = 0;
@@ -203,18 +200,6 @@ void __init mem_init(void)
memset(empty_zero_page, 0, PAGE_SIZE);
__flush_wback_region(empty_zero_page, PAGE_SIZE);
- /*
- * Setup wrappers for copy/clear_page(), these will get overridden
- * later in the boot process if a better method is available.
- */
-#ifdef CONFIG_MMU
- copy_page = copy_page_slow;
- clear_page = clear_page_slow;
-#else
- copy_page = copy_page_nommu;
- clear_page = clear_page_nommu;
-#endif
-
after_bootmem = 1;
codesize = (unsigned long) &_etext - (unsigned long) &_text;
diff --git a/arch/sh/mm/pg-nommu.c b/arch/sh/mm/pg-nommu.c
index d15221beaa1..677dd57f087 100644
--- a/arch/sh/mm/pg-nommu.c
+++ b/arch/sh/mm/pg-nommu.c
@@ -14,12 +14,12 @@
#include <linux/string.h>
#include <asm/page.h>
-void copy_page_nommu(void *to, void *from)
+void copy_page(void *to, void *from)
{
memcpy(to, from, PAGE_SIZE);
}
-void clear_page_nommu(void *to)
+void clear_page(void *to)
{
memset(to, 0, PAGE_SIZE);
}