mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
[PATCH] ARM: Add common CACHE_COLOUR macro
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
8830f04a09
commit
b8a9b66fbe
2 changed files with 5 additions and 4 deletions
|
@ -30,8 +30,6 @@
|
|||
|
||||
static DEFINE_SPINLOCK(v6_lock);
|
||||
|
||||
#define DCACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
|
||||
|
||||
/*
|
||||
* Copy the user page. No aliasing to deal with so we can just
|
||||
* attack the kernel's existing mapping of these pages.
|
||||
|
@ -55,7 +53,7 @@ void v6_clear_user_page_nonaliasing(void *kaddr, unsigned long vaddr)
|
|||
*/
|
||||
void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vaddr)
|
||||
{
|
||||
unsigned int offset = DCACHE_COLOUR(vaddr);
|
||||
unsigned int offset = CACHE_COLOUR(vaddr);
|
||||
unsigned long from, to;
|
||||
|
||||
/*
|
||||
|
@ -95,7 +93,7 @@ void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vadd
|
|||
*/
|
||||
void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr)
|
||||
{
|
||||
unsigned int offset = DCACHE_COLOUR(vaddr);
|
||||
unsigned int offset = CACHE_COLOUR(vaddr);
|
||||
unsigned long to = to_address + (offset << PAGE_SHIFT);
|
||||
|
||||
/*
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
|
||||
#include <asm/mman.h>
|
||||
#include <asm/glue.h>
|
||||
#include <asm/shmparam.h>
|
||||
|
||||
#define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
|
||||
|
||||
/*
|
||||
* Cache Model
|
||||
|
|
Loading…
Reference in a new issue