diff options
Diffstat (limited to 'arch/arm/mm/copypage-feroceon.c')
-rw-r--r-- | arch/arm/mm/copypage-feroceon.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/arch/arm/mm/copypage-feroceon.c b/arch/arm/mm/copypage-feroceon.c index c8347670ab00..edd71686b8df 100644 --- a/arch/arm/mm/copypage-feroceon.c +++ b/arch/arm/mm/copypage-feroceon.c | |||
@@ -7,15 +7,14 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * This handles copy_user_page and clear_user_page on Feroceon | 10 | * This handles copy_user_highpage and clear_user_page on Feroceon |
11 | * more optimally than the generic implementations. | 11 | * more optimally than the generic implementations. |
12 | */ | 12 | */ |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/highmem.h> | ||
14 | 15 | ||
15 | #include <asm/page.h> | 16 | static void __attribute__((naked)) |
16 | 17 | feroceon_copy_user_page(void *kto, const void *kfrom) | |
17 | void __attribute__((naked)) | ||
18 | feroceon_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) | ||
19 | { | 18 | { |
20 | asm("\ | 19 | asm("\ |
21 | stmfd sp!, {r4-r9, lr} \n\ | 20 | stmfd sp!, {r4-r9, lr} \n\ |
@@ -68,6 +67,18 @@ feroceon_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) | |||
68 | : "I" (PAGE_SIZE)); | 67 | : "I" (PAGE_SIZE)); |
69 | } | 68 | } |
70 | 69 | ||
70 | void feroceon_copy_user_highpage(struct page *to, struct page *from, | ||
71 | unsigned long vaddr) | ||
72 | { | ||
73 | void *kto, *kfrom; | ||
74 | |||
75 | kto = kmap_atomic(to, KM_USER0); | ||
76 | kfrom = kmap_atomic(from, KM_USER1); | ||
77 | feroceon_copy_user_page(kto, kfrom); | ||
78 | kunmap_atomic(kfrom, KM_USER1); | ||
79 | kunmap_atomic(kto, KM_USER0); | ||
80 | } | ||
81 | |||
71 | void __attribute__((naked)) | 82 | void __attribute__((naked)) |
72 | feroceon_clear_user_page(void *kaddr, unsigned long vaddr) | 83 | feroceon_clear_user_page(void *kaddr, unsigned long vaddr) |
73 | { | 84 | { |
@@ -95,6 +106,6 @@ feroceon_clear_user_page(void *kaddr, unsigned long vaddr) | |||
95 | 106 | ||
96 | struct cpu_user_fns feroceon_user_fns __initdata = { | 107 | struct cpu_user_fns feroceon_user_fns __initdata = { |
97 | .cpu_clear_user_page = feroceon_clear_user_page, | 108 | .cpu_clear_user_page = feroceon_clear_user_page, |
98 | .cpu_copy_user_page = feroceon_copy_user_page, | 109 | .cpu_copy_user_highpage = feroceon_copy_user_highpage, |
99 | }; | 110 | }; |
100 | 111 | ||