1 Index: linux-2.6.25/arch/mips/mm/init.c
2 ===================================================================
3 --- linux-2.6.25.orig/arch/mips/mm/init.c 2008-04-26 21:57:15.000000000 +0100
4 +++ linux-2.6.25/arch/mips/mm/init.c 2008-04-26 21:57:19.000000000 +0100
5 @@ -205,32 +205,6 @@ void kunmap_coherent(void)
6 preempt_check_resched();
9 -void copy_user_highpage(struct page *to, struct page *from,
10 - unsigned long vaddr, struct vm_area_struct *vma)
14 - vto = kmap_atomic(to, KM_USER1);
15 - if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
16 - page_mapped(from) && !Page_dcache_dirty(from)) {
17 - vfrom = kmap_coherent(from, vaddr);
18 - copy_page(vto, vfrom);
21 - vfrom = kmap_atomic(from, KM_USER0);
22 - copy_page(vto, vfrom);
23 - kunmap_atomic(vfrom, KM_USER0);
25 - if (((vma->vm_flags & VM_EXEC) && !cpu_has_ic_fills_f_dc) ||
26 - pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
27 - flush_data_cache_page((unsigned long)vto);
28 - kunmap_atomic(vto, KM_USER1);
29 - /* Make sure this page is cleared on other CPU's too before using it */
33 -EXPORT_SYMBOL(copy_user_highpage);
35 void copy_to_user_page(struct vm_area_struct *vma,
36 struct page *page, unsigned long vaddr, void *dst, const void *src,
38 Index: linux-2.6.25/include/asm-mips/page.h
39 ===================================================================
40 --- linux-2.6.25.orig/include/asm-mips/page.h 2008-04-26 21:56:21.000000000 +0100
41 +++ linux-2.6.25/include/asm-mips/page.h 2008-04-26 21:57:19.000000000 +0100
45 #include <linux/pfn.h>
46 +#include <asm/cpu-features.h>
50 @@ -64,13 +65,16 @@ static inline void clear_user_page(void
51 flush_data_cache_page((unsigned long)addr);
54 -extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
56 -struct vm_area_struct;
57 -extern void copy_user_highpage(struct page *to, struct page *from,
58 - unsigned long vaddr, struct vm_area_struct *vma);
59 +static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
62 + extern void (*flush_data_cache_page)(unsigned long addr);
64 -#define __HAVE_ARCH_COPY_USER_HIGHPAGE
65 + copy_page(vto, vfrom);
66 + if (!cpu_has_ic_fills_f_dc ||
67 + pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
68 + flush_data_cache_page((unsigned long)vto);
72 * These are used to make use of C type-checking..