diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-11-20 02:51:28 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:50 -0500 |
commit | 379a95d1d2c3e3682e380084c40b6fc01e38fa1f (patch) | |
tree | 663a232eaf663abe8e219c475dada42fd81fad4d /arch/sh/mm | |
parent | bcb28e42be8c1cce6cc523c1b656980011464016 (diff) |
sh: Tidy up various clear_page()/copy_page() definitions.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r-- | arch/sh/mm/copy_page.S | 6 | ||||
-rw-r--r-- | arch/sh/mm/init.c | 15 | ||||
-rw-r--r-- | arch/sh/mm/pg-nommu.c | 4 |
3 files changed, 5 insertions, 20 deletions
diff --git a/arch/sh/mm/copy_page.S b/arch/sh/mm/copy_page.S index 40685018b952..b879545fa28b 100644 --- a/arch/sh/mm/copy_page.S +++ b/arch/sh/mm/copy_page.S | |||
@@ -9,11 +9,11 @@ | |||
9 | #include <asm/page.h> | 9 | #include <asm/page.h> |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * copy_page_slow | 12 | * copy_page |
13 | * @to: P1 address | 13 | * @to: P1 address |
14 | * @from: P1 address | 14 | * @from: P1 address |
15 | * | 15 | * |
16 | * void copy_page_slow(void *to, void *from) | 16 | * void copy_page(void *to, void *from) |
17 | */ | 17 | */ |
18 | 18 | ||
19 | /* | 19 | /* |
@@ -23,7 +23,7 @@ | |||
23 | * r10 --- to | 23 | * r10 --- to |
24 | * r11 --- from | 24 | * r11 --- from |
25 | */ | 25 | */ |
26 | ENTRY(copy_page_slow) | 26 | ENTRY(copy_page) |
27 | mov.l r8,@-r15 | 27 | mov.l r8,@-r15 |
28 | mov.l r10,@-r15 | 28 | mov.l r10,@-r15 |
29 | mov.l r11,@-r15 | 29 | mov.l r11,@-r15 |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 5d19c8c7ab53..79c309780f95 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -24,9 +24,6 @@ | |||
24 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 24 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
25 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 25 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
26 | 26 | ||
27 | void (*copy_page)(void *from, void *to); | ||
28 | void (*clear_page)(void *to); | ||
29 | |||
30 | void show_mem(void) | 27 | void show_mem(void) |
31 | { | 28 | { |
32 | int total = 0, reserved = 0, free = 0; | 29 | int total = 0, reserved = 0, free = 0; |
@@ -203,18 +200,6 @@ void __init mem_init(void) | |||
203 | memset(empty_zero_page, 0, PAGE_SIZE); | 200 | memset(empty_zero_page, 0, PAGE_SIZE); |
204 | __flush_wback_region(empty_zero_page, PAGE_SIZE); | 201 | __flush_wback_region(empty_zero_page, PAGE_SIZE); |
205 | 202 | ||
206 | /* | ||
207 | * Setup wrappers for copy/clear_page(), these will get overridden | ||
208 | * later in the boot process if a better method is available. | ||
209 | */ | ||
210 | #ifdef CONFIG_MMU | ||
211 | copy_page = copy_page_slow; | ||
212 | clear_page = clear_page_slow; | ||
213 | #else | ||
214 | copy_page = copy_page_nommu; | ||
215 | clear_page = clear_page_nommu; | ||
216 | #endif | ||
217 | |||
218 | after_bootmem = 1; | 203 | after_bootmem = 1; |
219 | 204 | ||
220 | codesize = (unsigned long) &_etext - (unsigned long) &_text; | 205 | codesize = (unsigned long) &_etext - (unsigned long) &_text; |
diff --git a/arch/sh/mm/pg-nommu.c b/arch/sh/mm/pg-nommu.c index d15221beaa16..677dd57f0877 100644 --- a/arch/sh/mm/pg-nommu.c +++ b/arch/sh/mm/pg-nommu.c | |||
@@ -14,12 +14,12 @@ | |||
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | 16 | ||
17 | void copy_page_nommu(void *to, void *from) | 17 | void copy_page(void *to, void *from) |
18 | { | 18 | { |
19 | memcpy(to, from, PAGE_SIZE); | 19 | memcpy(to, from, PAGE_SIZE); |
20 | } | 20 | } |
21 | 21 | ||
22 | void clear_page_nommu(void *to) | 22 | void clear_page(void *to) |
23 | { | 23 | { |
24 | memset(to, 0, PAGE_SIZE); | 24 | memset(to, 0, PAGE_SIZE); |
25 | } | 25 | } |