diff options
author | Olof Johansson <olof@lixom.net> | 2011-12-15 22:02:34 -0800 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2011-12-15 22:02:34 -0800 |
commit | 02735a29d8ce882ec698803f064e17888874780c (patch) | |
tree | 6a4afa3bc8b6d4334df24910a56f77adf126b0c7 /arch/arm/mm/mmap.c | |
parent | 8d685b7f4d9c9882442bf1b492558d5f17b694fa (diff) | |
parent | 3d911ad22e8405c1a333a6812e405cb1a5ae9829 (diff) | |
download | linux-stable-02735a29d8ce882ec698803f064e17888874780c.tar.gz linux-stable-02735a29d8ce882ec698803f064e17888874780c.tar.bz2 linux-stable-02735a29d8ce882ec698803f064e17888874780c.zip |
Merge branch 'at91/defconfig' into next/cleanup
Diffstat (limited to 'arch/arm/mm/mmap.c')
-rw-r--r-- | arch/arm/mm/mmap.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index 74be05f3e03a..44b628e4d6ea 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c @@ -9,8 +9,7 @@ #include <linux/io.h> #include <linux/personality.h> #include <linux/random.h> -#include <asm/cputype.h> -#include <asm/system.h> +#include <asm/cachetype.h> #define COLOUR_ALIGN(addr,pgoff) \ ((((addr)+SHMLBA-1)&~(SHMLBA-1)) + \ @@ -32,25 +31,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, struct mm_struct *mm = current->mm; struct vm_area_struct *vma; unsigned long start_addr; -#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) - unsigned int cache_type; - int do_align = 0, aliasing = 0; + int do_align = 0; + int aliasing = cache_is_vipt_aliasing(); /* * We only need to do colour alignment if either the I or D - * caches alias. This is indicated by bits 9 and 21 of the - * cache type register. + * caches alias. */ - cache_type = read_cpuid_cachetype(); - if (cache_type != read_cpuid_id()) { - aliasing = (cache_type | cache_type >> 12) & (1 << 11); - if (aliasing) - do_align = filp || flags & MAP_SHARED; - } -#else -#define do_align 0 -#define aliasing 0 -#endif + if (aliasing) + do_align = filp || (flags & MAP_SHARED); /* * We enforce the MAP_FIXED case. |