diff options
Diffstat (limited to 'arch/arm/mm/copypage-xsc3.c')
-rw-r--r-- | arch/arm/mm/copypage-xsc3.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/arch/arm/mm/copypage-xsc3.c b/arch/arm/mm/copypage-xsc3.c index caa697ccd8db..0e7cb325ca4c 100644 --- a/arch/arm/mm/copypage-xsc3.c +++ b/arch/arm/mm/copypage-xsc3.c | |||
@@ -87,26 +87,27 @@ void xsc3_mc_copy_user_highpage(struct page *to, struct page *from, | |||
87 | * r0 = destination | 87 | * r0 = destination |
88 | * r1 = virtual user address of ultimate destination page | 88 | * r1 = virtual user address of ultimate destination page |
89 | */ | 89 | */ |
90 | void __attribute__((naked)) | 90 | void xsc3_mc_clear_user_highpage(struct page *page, unsigned long vaddr) |
91 | xsc3_mc_clear_user_page(void *kaddr, unsigned long vaddr) | ||
92 | { | 91 | { |
92 | void *kaddr = kmap_atomic(page, KM_USER0); | ||
93 | asm("\ | 93 | asm("\ |
94 | mov r1, %0 \n\ | 94 | mov r1, %1 \n\ |
95 | mov r2, #0 \n\ | 95 | mov r2, #0 \n\ |
96 | mov r3, #0 \n\ | 96 | mov r3, #0 \n\ |
97 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate line\n\ | 97 | 1: mcr p15, 0, %0, c7, c6, 1 @ invalidate line\n\ |
98 | strd r2, [r0], #8 \n\ | 98 | strd r2, [%0], #8 \n\ |
99 | strd r2, [r0], #8 \n\ | 99 | strd r2, [%0], #8 \n\ |
100 | strd r2, [r0], #8 \n\ | 100 | strd r2, [%0], #8 \n\ |
101 | strd r2, [r0], #8 \n\ | 101 | strd r2, [%0], #8 \n\ |
102 | subs r1, r1, #1 \n\ | 102 | subs r1, r1, #1 \n\ |
103 | bne 1b \n\ | 103 | bne 1b" |
104 | mov pc, lr" | ||
105 | : | 104 | : |
106 | : "I" (PAGE_SIZE / 32)); | 105 | : "r" (kaddr), "I" (PAGE_SIZE / 32) |
106 | : "r1", "r2", "r3"); | ||
107 | kunmap_atomic(kaddr, KM_USER0); | ||
107 | } | 108 | } |
108 | 109 | ||
109 | struct cpu_user_fns xsc3_mc_user_fns __initdata = { | 110 | struct cpu_user_fns xsc3_mc_user_fns __initdata = { |
110 | .cpu_clear_user_page = xsc3_mc_clear_user_page, | 111 | .cpu_clear_user_highpage = xsc3_mc_clear_user_highpage, |
111 | .cpu_copy_user_highpage = xsc3_mc_copy_user_highpage, | 112 | .cpu_copy_user_highpage = xsc3_mc_copy_user_highpage, |
112 | }; | 113 | }; |