Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276150
b: refs/heads/master
c: 41dfaa9
h: refs/heads/master
v: v3
  • Loading branch information
Rob Herring authored and Russell King committed Nov 26, 2011
1 parent 580177c commit 0511172
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7334c6755eb7dbaa5d3112a33f5f2cb9826abe8c
refs/heads/master: 41dfaa934c5d866d626de9bea785e6168524a47e
23 changes: 6 additions & 17 deletions trunk/arch/arm/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) + \
Expand All @@ -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.
Expand Down

0 comments on commit 0511172

Please sign in to comment.