Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/xfs-vipt
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 27 Feb 2010 01:05:10 +0000 (17:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 27 Feb 2010 01:05:10 +0000 (17:05 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/xfs-vipt:
  xfs: fix xfs to work with Virtually Indexed architectures
  sh: add mm API for DMA to vmalloc/vmap areas
  arm: add mm API for DMA to vmalloc/vmap areas
  parisc: add mm API for DMA to vmalloc/vmap areas
  mm: add coherence API for DMA to vmalloc/vmap areas

1  2 
arch/arm/include/asm/cacheflush.h
include/linux/highmem.h

@@@ -42,8 -42,7 +42,8 @@@
  #endif
  
  #if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \
 -    defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020)
 +    defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020) || \
 +    defined(CONFIG_CPU_ARM1026)
  # define MULTI_CACHE 1
  #endif
  
   *    Please note that the implementation of these, and the required
   *    effects are cache-type (VIVT/VIPT/PIPT) specific.
   *
 - *    flush_cache_kern_all()
 + *    flush_kern_all()
   *
   *            Unconditionally clean and invalidate the entire cache.
   *
 - *    flush_cache_user_mm(mm)
 + *    flush_user_all()
   *
   *            Clean and invalidate all user space cache entries
   *            before a change of page tables.
   *
 - *    flush_cache_user_range(start, end, flags)
 + *    flush_user_range(start, end, flags)
   *
   *            Clean and invalidate a range of cache entries in the
   *            specified address space before a change of page tables.
   *            - start  - virtual start address
   *            - end    - virtual end address
   *
 + *    coherent_user_range(start, end)
 + *
 + *            Ensure coherency between the Icache and the Dcache in the
 + *            region described by start, end.  If you have non-snooping
 + *            Harvard caches, you need to implement this function.
 + *            - start  - virtual start address
 + *            - end    - virtual end address
 + *
 + *    flush_kern_dcache_area(kaddr, size)
 + *
 + *            Ensure that the data held in page is written back.
 + *            - kaddr  - page address
 + *            - size   - region size
 + *
   *    DMA Cache Coherency
   *    ===================
   *
@@@ -447,6 -432,16 +447,16 @@@ static inline void __flush_icache_all(v
            : "r" (0));
  #endif
  }
+ static inline void flush_kernel_vmap_range(void *addr, int size)
+ {
+       if ((cache_is_vivt() || cache_is_vipt_aliasing()))
+         __cpuc_flush_dcache_area(addr, (size_t)size);
+ }
+ static inline void invalidate_kernel_vmap_range(void *addr, int size)
+ {
+       if ((cache_is_vivt() || cache_is_vipt_aliasing()))
+         __cpuc_flush_dcache_area(addr, (size_t)size);
+ }
  
  #define ARCH_HAS_FLUSH_ANON_PAGE
  static inline void flush_anon_page(struct vm_area_struct *vma,
diff --combined include/linux/highmem.h
@@@ -17,6 -17,12 +17,12 @@@ static inline void flush_anon_page(stru
  static inline void flush_kernel_dcache_page(struct page *page)
  {
  }
+ static inline void flush_kernel_vmap_range(void *vaddr, int size)
+ {
+ }
+ static inline void invalidate_kernel_vmap_range(void *vaddr, int size)
+ {
+ }
  #endif
  
  #include <asm/kmap_types.h>
@@@ -46,7 -52,7 +52,7 @@@ void kmap_flush_unused(void)
  
  static inline unsigned int nr_free_highpages(void) { return 0; }
  
 -#define totalhigh_pages 0
 +#define totalhigh_pages 0UL
  
  #ifndef ARCH_HAS_KMAP
  static inline void *kmap(struct page *page)