1 --- a/arch/mips/include/asm/page.h
2 +++ b/arch/mips/include/asm/page.h
7 +#include <asm/cpu-features.h>
10 extern void build_clear_page(void);
11 @@ -78,13 +79,16 @@ static inline void clear_user_page(void
12 flush_data_cache_page((unsigned long)addr);
15 -extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
17 -struct vm_area_struct;
18 -extern void copy_user_highpage(struct page *to, struct page *from,
19 - unsigned long vaddr, struct vm_area_struct *vma);
20 +static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
23 + extern void (*flush_data_cache_page)(unsigned long addr);
25 -#define __HAVE_ARCH_COPY_USER_HIGHPAGE
26 + copy_page(vto, vfrom);
27 + if (!cpu_has_ic_fills_f_dc ||
28 + pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
29 + flush_data_cache_page((unsigned long)vto);
33 * These are used to make use of C type-checking..
34 --- a/arch/mips/mm/init.c
35 +++ b/arch/mips/mm/init.c
36 @@ -202,30 +202,6 @@ void kunmap_coherent(void)
37 preempt_check_resched();
40 -void copy_user_highpage(struct page *to, struct page *from,
41 - unsigned long vaddr, struct vm_area_struct *vma)
45 - vto = kmap_atomic(to, KM_USER1);
46 - if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
47 - page_mapped(from) && !Page_dcache_dirty(from)) {
48 - vfrom = kmap_coherent(from, vaddr);
49 - copy_page(vto, vfrom);
52 - vfrom = kmap_atomic(from, KM_USER0);
53 - copy_page(vto, vfrom);
54 - kunmap_atomic(vfrom, KM_USER0);
56 - if ((!cpu_has_ic_fills_f_dc) ||
57 - pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
58 - flush_data_cache_page((unsigned long)vto);
59 - kunmap_atomic(vto, KM_USER1);
60 - /* Make sure this page is cleared on other CPU's too before using it */
64 void copy_to_user_page(struct vm_area_struct *vma,
65 struct page *page, unsigned long vaddr, void *dst, const void *src,