diff options
Diffstat (limited to 'arch/sh/mm/pg-nommu.c')
-rw-r--r-- | arch/sh/mm/pg-nommu.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/sh/mm/pg-nommu.c b/arch/sh/mm/pg-nommu.c new file mode 100644 index 000000000000..8f9165a4e333 --- /dev/null +++ b/arch/sh/mm/pg-nommu.c | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * arch/sh/mm/pg-nommu.c | ||
3 | * | ||
4 | * clear_page()/copy_page() implementation for MMUless SH. | ||
5 | * | ||
6 | * Copyright (C) 2003 Paul Mundt | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/string.h> | ||
15 | #include <asm/page.h> | ||
16 | |||
17 | static void copy_page_nommu(void *to, void *from) | ||
18 | { | ||
19 | memcpy(to, from, PAGE_SIZE); | ||
20 | } | ||
21 | |||
22 | static void clear_page_nommu(void *to) | ||
23 | { | ||
24 | memset(to, 0, PAGE_SIZE); | ||
25 | } | ||
26 | |||
27 | static int __init pg_nommu_init(void) | ||
28 | { | ||
29 | copy_page = copy_page_nommu; | ||
30 | clear_page = clear_page_nommu; | ||
31 | |||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | subsys_initcall(pg_nommu_init); | ||
36 | |||