diff options
Diffstat (limited to 'arch/mips/mm/init.c')
-rw-r--r-- | arch/mips/mm/init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 3b3ffd439cd7..1a85ba92eb5c 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -207,21 +207,21 @@ void copy_user_highpage(struct page *to, struct page *from, | |||
207 | { | 207 | { |
208 | void *vfrom, *vto; | 208 | void *vfrom, *vto; |
209 | 209 | ||
210 | vto = kmap_atomic(to, KM_USER1); | 210 | vto = kmap_atomic(to); |
211 | if (cpu_has_dc_aliases && | 211 | if (cpu_has_dc_aliases && |
212 | page_mapped(from) && !Page_dcache_dirty(from)) { | 212 | page_mapped(from) && !Page_dcache_dirty(from)) { |
213 | vfrom = kmap_coherent(from, vaddr); | 213 | vfrom = kmap_coherent(from, vaddr); |
214 | copy_page(vto, vfrom); | 214 | copy_page(vto, vfrom); |
215 | kunmap_coherent(); | 215 | kunmap_coherent(); |
216 | } else { | 216 | } else { |
217 | vfrom = kmap_atomic(from, KM_USER0); | 217 | vfrom = kmap_atomic(from); |
218 | copy_page(vto, vfrom); | 218 | copy_page(vto, vfrom); |
219 | kunmap_atomic(vfrom, KM_USER0); | 219 | kunmap_atomic(vfrom); |
220 | } | 220 | } |
221 | if ((!cpu_has_ic_fills_f_dc) || | 221 | if ((!cpu_has_ic_fills_f_dc) || |
222 | pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK)) | 222 | pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK)) |
223 | flush_data_cache_page((unsigned long)vto); | 223 | flush_data_cache_page((unsigned long)vto); |
224 | kunmap_atomic(vto, KM_USER1); | 224 | kunmap_atomic(vto); |
225 | /* Make sure this page is cleared on other CPU's too before using it */ | 225 | /* Make sure this page is cleared on other CPU's too before using it */ |
226 | smp_wmb(); | 226 | smp_wmb(); |
227 | } | 227 | } |