1 --- a/arch/mips/mm/init.c
2 +++ b/arch/mips/mm/init.c
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 && !Page_dcache_dirty(from)) {
14 - vfrom = kmap_coherent(from, vaddr);
15 - copy_page(vto, vfrom);
18 - vfrom = kmap_atomic(from, KM_USER0);
19 - copy_page(vto, vfrom);
20 - kunmap_atomic(vfrom, KM_USER0);
22 - if (((vma->vm_flags & VM_EXEC) && !cpu_has_ic_fills_f_dc) ||
23 - pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
24 - flush_data_cache_page((unsigned long)vto);
25 - kunmap_atomic(vto, KM_USER1);
26 - /* Make sure this page is cleared on other CPU's too before using it */
30 -EXPORT_SYMBOL(copy_user_highpage);
32 void copy_to_user_page(struct vm_area_struct *vma,
33 struct page *page, unsigned long vaddr, void *dst, const void *src,
35 --- a/include/asm-mips/page.h
36 +++ b/include/asm-mips/page.h
40 #include <linux/pfn.h>
41 +#include <asm/cpu-features.h>
46 flush_data_cache_page((unsigned long)addr);
49 -extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
51 -struct vm_area_struct;
52 -extern void copy_user_highpage(struct page *to, struct page *from,
53 - unsigned long vaddr, struct vm_area_struct *vma);
54 +static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
57 + extern void (*flush_data_cache_page)(unsigned long addr);
59 -#define __HAVE_ARCH_COPY_USER_HIGHPAGE
60 + copy_page(vto, vfrom);
61 + if (!cpu_has_ic_fills_f_dc ||
62 + pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
63 + flush_data_cache_page((unsigned long)vto);
67 * These are used to make use of C type-checking..