]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] ARM: Add common CACHE_COLOUR macro
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Mon, 20 Jun 2005 10:31:09 +0000 (11:31 +0100)
committerRussell King <rmk@dyn-67.arm.linux.org.uk>
Mon, 20 Jun 2005 10:31:09 +0000 (11:31 +0100)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/copypage-v6.c
include/asm-arm/cacheflush.h

index a8c00236bd3d54283da26f1fe36d3a0cc3d6c636..27d041574ea7891ab91bd9c1917ba1ee7e2be58f 100644 (file)
@@ -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);
 
        /*
index 09ffeed507c2098a980b1f7eb65e5369d0598907..035cdcff43d233e8566e5ed0ce3e6b04514be4d9 100644 (file)
@@ -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