Remove files now present upstream in files-2.6.25 (This is mostly just drivers/ssb...
[librecmc/librecmc.git] / target / linux / brcm47xx / patches-2.6.25 / 310-no_highpage.patch
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();
7  }
8  
9 -void copy_user_highpage(struct page *to, struct page *from,
10 -       unsigned long vaddr, struct vm_area_struct *vma)
11 -{
12 -       void *vfrom, *vto;
13 -
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);
19 -               kunmap_coherent();
20 -       } else {
21 -               vfrom = kmap_atomic(from, KM_USER0);
22 -               copy_page(vto, vfrom);
23 -               kunmap_atomic(vfrom, KM_USER0);
24 -       }
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 */
30 -       smp_wmb();
31 -}
32 -
33 -EXPORT_SYMBOL(copy_user_highpage);
34 -
35  void copy_to_user_page(struct vm_area_struct *vma,
36         struct page *page, unsigned long vaddr, void *dst, const void *src,
37         unsigned long len)
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
42 @@ -32,6 +32,7 @@
43  #ifndef __ASSEMBLY__
44  
45  #include <linux/pfn.h>
46 +#include <asm/cpu-features.h>
47  #include <asm/io.h>
48  
49  /*
50 @@ -64,13 +65,16 @@ static inline void clear_user_page(void 
51                 flush_data_cache_page((unsigned long)addr);
52  }
53  
54 -extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
55 -       struct page *to);
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,
60 +       struct page *to)
61 +{
62 +       extern void (*flush_data_cache_page)(unsigned long addr);
63  
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);
69 +}
70  
71  /*
72   * These are used to make use of C type-checking..