Document how to fix BASE-IS-OLD
[mirror/dsa-wiki.git] / input / howto / swarm_ide.2.6.31.patch
1 diff --git a/arch/mips/include/asm/cacheflush.h b/arch/mips/include/asm/cacheflush.h
2 index 03b1d69..d32f12a 100644
3 --- a/arch/mips/include/asm/cacheflush.h
4 +++ b/arch/mips/include/asm/cacheflush.h
5 @@ -37,6 +37,7 @@ extern void (*flush_cache_range)(struct vm_area_struct *vma,
6         unsigned long start, unsigned long end);
7  extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn);
8  extern void __flush_dcache_page(struct page *page);
9 +extern void __flush_icache_page(struct vm_area_struct *vma, struct page *page);
10  
11  static inline void flush_dcache_page(struct page *page)
12  {
13 @@ -57,11 +58,6 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
14                 __flush_anon_page(page, vmaddr);
15  }
16  
17 -static inline void flush_icache_page(struct vm_area_struct *vma,
18 -       struct page *page)
19 -{
20 -}
21 -
22  extern void (*flush_icache_range)(unsigned long start, unsigned long end);
23  extern void (*local_flush_icache_range)(unsigned long start, unsigned long end);
24  
25 @@ -94,6 +90,13 @@ extern void (*flush_icache_all)(void);
26  extern void (*local_flush_data_cache_page)(void * addr);
27  extern void (*flush_data_cache_page)(unsigned long addr);
28  
29 +static inline void flush_icache_page(struct vm_area_struct *vma,
30 +       struct page *page)
31 +{
32 +        __flush_icache_page(vma, page);
33 +}
34 +
35 +
36  /*
37   * This flag is used to indicate that the page pointed to by a pte
38   * is dirty and requires cleaning before returning it to the user.
39 diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
40 index 694d51f..9214d6b 100644
41 --- a/arch/mips/mm/cache.c
42 +++ b/arch/mips/mm/cache.c
43 @@ -95,6 +95,14 @@ void __flush_dcache_page(struct page *page)
44  
45  EXPORT_SYMBOL(__flush_dcache_page);
46  
47 +void __flush_icache_page(struct vm_area_struct *vma, struct page *page)
48 +{
49 +       if (vma->vm_flags & VM_EXEC)
50 +               flush_icache_range((unsigned long) page_address(page), PAGE_SIZE);
51 +}
52 +
53 +EXPORT_SYMBOL(__flush_icache_page);
54 +
55  void __flush_anon_page(struct page *page, unsigned long vmaddr)
56  {
57         unsigned long addr = (unsigned long) page_address(page);