diff options
-rw-r--r-- | arch/arm/mm/copypage-v6.c | 6 | ||||
-rw-r--r-- | include/asm-arm/cacheflush.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index a8c00236bd3d..27d041574ea7 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c | |||
@@ -30,8 +30,6 @@ | |||
30 | 30 | ||
31 | static DEFINE_SPINLOCK(v6_lock); | 31 | static DEFINE_SPINLOCK(v6_lock); |
32 | 32 | ||
33 | #define DCACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) | ||
34 | |||
35 | /* | 33 | /* |
36 | * Copy the user page. No aliasing to deal with so we can just | 34 | * Copy the user page. No aliasing to deal with so we can just |
37 | * attack the kernel's existing mapping of these pages. | 35 | * attack the kernel's existing mapping of these pages. |
@@ -55,7 +53,7 @@ void v6_clear_user_page_nonaliasing(void *kaddr, unsigned long vaddr) | |||
55 | */ | 53 | */ |
56 | void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vaddr) | 54 | void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vaddr) |
57 | { | 55 | { |
58 | unsigned int offset = DCACHE_COLOUR(vaddr); | 56 | unsigned int offset = CACHE_COLOUR(vaddr); |
59 | unsigned long from, to; | 57 | unsigned long from, to; |
60 | 58 | ||
61 | /* | 59 | /* |
@@ -95,7 +93,7 @@ void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vadd | |||
95 | */ | 93 | */ |
96 | void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) | 94 | void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) |
97 | { | 95 | { |
98 | unsigned int offset = DCACHE_COLOUR(vaddr); | 96 | unsigned int offset = CACHE_COLOUR(vaddr); |
99 | unsigned long to = to_address + (offset << PAGE_SHIFT); | 97 | unsigned long to = to_address + (offset << PAGE_SHIFT); |
100 | 98 | ||
101 | /* | 99 | /* |
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index 09ffeed507c2..035cdcff43d2 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h | |||
@@ -16,6 +16,9 @@ | |||
16 | 16 | ||
17 | #include <asm/mman.h> | 17 | #include <asm/mman.h> |
18 | #include <asm/glue.h> | 18 | #include <asm/glue.h> |
19 | #include <asm/shmparam.h> | ||
20 | |||
21 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) | ||
19 | 22 | ||
20 | /* | 23 | /* |
21 | * Cache Model | 24 | * Cache Model |