Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123553
b: refs/heads/master
c: 376e142
h: refs/heads/master
i:
  123551: b37cd6b
v: v3
  • Loading branch information
Catalin Marinas committed Nov 6, 2008
1 parent 4a6d468 commit 548c132
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 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: 24b647a042b988b017e6cdf60b47a0bfecd1dc41
refs/heads/master: 376e14218d3d791127e9b9bfbe2f99c44c2a19c2
36 changes: 26 additions & 10 deletions trunk/arch/arm/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <asm/glue.h>
#include <asm/shmparam.h>
#include <asm/cachetype.h>

#define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)

Expand Down Expand Up @@ -295,16 +296,6 @@ static inline void outer_flush_range(unsigned long start, unsigned long end)

#endif

/*
* flush_cache_vmap() is used when creating mappings (eg, via vmap,
* vmalloc, ioremap etc) in kernel space for pages. Since the
* direct-mappings of these pages may contain cached data, we need
* to do a full cache flush to ensure that writebacks don't corrupt
* data placed into these pages via the new mappings.
*/
#define flush_cache_vmap(start, end) flush_cache_all()
#define flush_cache_vunmap(start, end) flush_cache_all()

/*
* Copy user data from/to a page which is mapped into a different
* processes address space. Really, we want to allow our "user
Expand Down Expand Up @@ -444,4 +435,29 @@ static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt,
dmac_inv_range(start, start + size);
}

/*
* flush_cache_vmap() is used when creating mappings (eg, via vmap,
* vmalloc, ioremap etc) in kernel space for pages. On non-VIPT
* caches, since the direct-mappings of these pages may contain cached
* data, we need to do a full cache flush to ensure that writebacks
* don't corrupt data placed into these pages via the new mappings.
*/
static inline void flush_cache_vmap(unsigned long start, unsigned long end)
{
if (!cache_is_vipt_nonaliasing())
flush_cache_all();
else
/*
* set_pte_at() called from vmap_pte_range() does not
* have a DSB after cleaning the cache line.
*/
dsb();
}

static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
{
if (!cache_is_vipt_nonaliasing())
flush_cache_all();
}

#endif

0 comments on commit 548c132

Please sign in to comment.