atheros: fix up the wlan mac address if the board data is missing
[openwrt.git] / target / linux / brcm47xx / patches-2.6.25 / 310-no_highpage.patch
1 --- a/arch/mips/mm/init.c
2 +++ b/arch/mips/mm/init.c
3 @@ -205,32 +205,6 @@ void kunmap_coherent(void)
4 preempt_check_resched();
5 }
6
7 -void copy_user_highpage(struct page *to, struct page *from,
8 - unsigned long vaddr, struct vm_area_struct *vma)
9 -{
10 - void *vfrom, *vto;
11 -
12 - vto = kmap_atomic(to, KM_USER1);
13 - if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
14 - page_mapped(from) && !Page_dcache_dirty(from)) {
15 - vfrom = kmap_coherent(from, vaddr);
16 - copy_page(vto, vfrom);
17 - kunmap_coherent();
18 - } else {
19 - vfrom = kmap_atomic(from, KM_USER0);
20 - copy_page(vto, vfrom);
21 - kunmap_atomic(vfrom, KM_USER0);
22 - }
23 - if (((vma->vm_flags & VM_EXEC) && !cpu_has_ic_fills_f_dc) ||
24 - pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
25 - flush_data_cache_page((unsigned long)vto);
26 - kunmap_atomic(vto, KM_USER1);
27 - /* Make sure this page is cleared on other CPU's too before using it */
28 - smp_wmb();
29 -}
30 -
31 -EXPORT_SYMBOL(copy_user_highpage);
32 -
33 void copy_to_user_page(struct vm_area_struct *vma,
34 struct page *page, unsigned long vaddr, void *dst, const void *src,
35 unsigned long len)
36 --- a/include/asm-mips/page.h
37 +++ b/include/asm-mips/page.h
38 @@ -32,6 +32,7 @@
39 #ifndef __ASSEMBLY__
40
41 #include <linux/pfn.h>
42 +#include <asm/cpu-features.h>
43 #include <asm/io.h>
44
45 /*
46 @@ -64,13 +65,16 @@ static inline void clear_user_page(void
47 flush_data_cache_page((unsigned long)addr);
48 }
49
50 -extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
51 - struct page *to);
52 -struct vm_area_struct;
53 -extern void copy_user_highpage(struct page *to, struct page *from,
54 - unsigned long vaddr, struct vm_area_struct *vma);
55 +static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
56 + struct page *to)
57 +{
58 + extern void (*flush_data_cache_page)(unsigned long addr);
59
60 -#define __HAVE_ARCH_COPY_USER_HIGHPAGE
61 + copy_page(vto, vfrom);
62 + if (!cpu_has_ic_fills_f_dc ||
63 + pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
64 + flush_data_cache_page((unsigned long)vto);
65 +}
66
67 /*
68 * These are used to make use of C type-checking..
This page took 0.05584 seconds and 5 git commands to generate.