[adm5120] NFS-101U/WU: add PCI irq map and change vlan map
[openwrt.git] / target / linux / brcm47xx / patches-2.6.28 / 310-no_highpage.patch
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
4 @@ -32,6 +32,7 @@
5 #ifndef __ASSEMBLY__
6
7 #include <linux/pfn.h>
8 +#include <asm/cpu-features.h>
9 #include <asm/io.h>
10
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);
14 }
15
16 -extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
17 - struct page *to);
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,
22 + struct page *to)
23 +{
24 + extern void (*flush_data_cache_page)(unsigned long addr);
25
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);
31 +}
32
33 /*
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();
40 }
41
42 -void copy_user_highpage(struct page *to, struct page *from,
43 - unsigned long vaddr, struct vm_area_struct *vma)
44 -{
45 - void *vfrom, *vto;
46 -
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);
52 - kunmap_coherent();
53 - } else {
54 - vfrom = kmap_atomic(from, KM_USER0);
55 - copy_page(vto, vfrom);
56 - kunmap_atomic(vfrom, KM_USER0);
57 - }
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 */
63 - smp_wmb();
64 -}
65 -
66 void copy_to_user_page(struct vm_area_struct *vma,
67 struct page *page, unsigned long vaddr, void *dst, const void *src,
68 unsigned long len)
This page took 0.04712 seconds and 5 git commands to generate.