1 diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
2 --- a/arch/mips/include/asm/page.h
3 +++ b/arch/mips/include/asm/page.h
8 +#include <asm/cpu-features.h>
11 extern void build_clear_page(void);
12 @@ -67,13 +68,16 @@ static inline void clear_user_page(void *addr, unsigned long vaddr,
13 flush_data_cache_page((unsigned long)addr);
16 -extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
18 -struct vm_area_struct;
19 -extern void copy_user_highpage(struct page *to, struct page *from,
20 - unsigned long vaddr, struct vm_area_struct *vma);
21 +static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
24 + extern void (*flush_data_cache_page)(unsigned long addr);
26 -#define __HAVE_ARCH_COPY_USER_HIGHPAGE
27 + copy_page(vto, vfrom);
28 + if (!cpu_has_ic_fills_f_dc ||
29 + pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
30 + flush_data_cache_page((unsigned long)vto);
34 * These are used to make use of C type-checking..
35 diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
36 --- a/arch/mips/mm/init.c
37 +++ b/arch/mips/mm/init.c
38 @@ -206,30 +206,6 @@ void kunmap_coherent(void)
39 preempt_check_resched();
42 -void copy_user_highpage(struct page *to, struct page *from,
43 - unsigned long vaddr, struct vm_area_struct *vma)
47 - vto = kmap_atomic(to, KM_USER1);
48 - if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
49 - page_mapped(from) && !Page_dcache_dirty(from)) {
50 - vfrom = kmap_coherent(from, vaddr);
51 - copy_page(vto, vfrom);
54 - vfrom = kmap_atomic(from, KM_USER0);
55 - copy_page(vto, vfrom);
56 - kunmap_atomic(vfrom, KM_USER0);
58 - if ((!cpu_has_ic_fills_f_dc) ||
59 - pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
60 - flush_data_cache_page((unsigned long)vto);
61 - kunmap_atomic(vto, KM_USER1);
62 - /* Make sure this page is cleared on other CPU's too before using it */
66 void copy_to_user_page(struct vm_area_struct *vma,
67 struct page *page, unsigned long vaddr, void *dst, const void *src,