[tools/firmware-utils] imagetag: Significantly updated brcm63xx imagetag writing...
[openwrt.git] / target / linux / brcm47xx / patches-2.6.36 / 310-no_highpage.patch
1 --- a/arch/mips/include/asm/page.h
2 +++ b/arch/mips/include/asm/page.h
3 @@ -43,6 +43,7 @@
4 #ifndef __ASSEMBLY__
5
6 #include <linux/pfn.h>
7 +#include <asm/cpu-features.h>
8 #include <asm/io.h>
9
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);
13 }
14
15 -extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
16 - struct page *to);
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,
21 + struct page *to)
22 +{
23 + extern void (*flush_data_cache_page)(unsigned long addr);
24
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);
30 +}
31
32 /*
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 @@ -204,30 +204,6 @@ void kunmap_coherent(void)
37 preempt_check_resched();
38 }
39
40 -void copy_user_highpage(struct page *to, struct page *from,
41 - unsigned long vaddr, struct vm_area_struct *vma)
42 -{
43 - void *vfrom, *vto;
44 -
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);
50 - kunmap_coherent();
51 - } else {
52 - vfrom = kmap_atomic(from, KM_USER0);
53 - copy_page(vto, vfrom);
54 - kunmap_atomic(vfrom, KM_USER0);
55 - }
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 */
61 - smp_wmb();
62 -}
63 -
64 void copy_to_user_page(struct vm_area_struct *vma,
65 struct page *page, unsigned long vaddr, void *dst, const void *src,
66 unsigned long len)
This page took 0.050801 seconds and 5 git commands to generate.