1 --- a/arch/mips/mm/init.c
2 +++ b/arch/mips/mm/init.c
3 @@ -205,32 +205,6 @@ void kunmap_coherent(void)
4 preempt_check_resched();
7 -void copy_user_highpage(struct page *to, struct page *from,
8 - unsigned long vaddr, struct vm_area_struct *vma)
12 - vto = kmap_atomic(to, KM_USER1);
13 - if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
14 - page_mapped(from) && !Page_dcache_dirty(from)) {
15 - vfrom = kmap_coherent(from, vaddr);
16 - copy_page(vto, vfrom);
19 - vfrom = kmap_atomic(from, KM_USER0);
20 - copy_page(vto, vfrom);
21 - kunmap_atomic(vfrom, KM_USER0);
23 - if (((vma->vm_flags & VM_EXEC) && !cpu_has_ic_fills_f_dc) ||
24 - pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
25 - flush_data_cache_page((unsigned long)vto);
26 - kunmap_atomic(vto, KM_USER1);
27 - /* Make sure this page is cleared on other CPU's too before using it */
31 -EXPORT_SYMBOL(copy_user_highpage);
33 void copy_to_user_page(struct vm_area_struct *vma,
34 struct page *page, unsigned long vaddr, void *dst, const void *src,
36 --- a/include/asm-mips/page.h
37 +++ b/include/asm-mips/page.h
41 #include <linux/pfn.h>
42 +#include <asm/cpu-features.h>
46 @@ -64,13 +65,16 @@ static inline void clear_user_page(void
47 flush_data_cache_page((unsigned long)addr);
50 -extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
52 -struct vm_area_struct;
53 -extern void copy_user_highpage(struct page *to, struct page *from,
54 - unsigned long vaddr, struct vm_area_struct *vma);
55 +static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
58 + extern void (*flush_data_cache_page)(unsigned long addr);
60 -#define __HAVE_ARCH_COPY_USER_HIGHPAGE
61 + copy_page(vto, vfrom);
62 + if (!cpu_has_ic_fills_f_dc ||
63 + pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
64 + flush_data_cache_page((unsigned long)vto);
68 * These are used to make use of C type-checking..