diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-06-29 06:44:43 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-06-29 06:44:43 -0400 |
commit | 3c0c01ab742ddfaf6b6f2d64b890e77cda4b7727 (patch) | |
tree | d0f196c53d209f44190fd8a6481823b7770866e6 /arch/arm/mm/flush.c | |
parent | cbd379b10019617457bda31eb243890f4377fa3e (diff) | |
parent | 809e660f438fc5a69bf57630a85bcd8112263f37 (diff) |
Merge branch 'devel-stable' into for-next
Conflicts:
arch/arm/Makefile
arch/arm/include/asm/glue-proc.h
Diffstat (limited to 'arch/arm/mm/flush.c')
-rw-r--r-- | arch/arm/mm/flush.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index e4ac5d8278e1..6d5ba9afb16a 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/highmem.h> | 17 | #include <asm/highmem.h> |
18 | #include <asm/smp_plat.h> | 18 | #include <asm/smp_plat.h> |
19 | #include <asm/tlbflush.h> | 19 | #include <asm/tlbflush.h> |
20 | #include <linux/hugetlb.h> | ||
20 | 21 | ||
21 | #include "mm.h" | 22 | #include "mm.h" |
22 | 23 | ||
@@ -168,19 +169,23 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page) | |||
168 | * coherent with the kernels mapping. | 169 | * coherent with the kernels mapping. |
169 | */ | 170 | */ |
170 | if (!PageHighMem(page)) { | 171 | if (!PageHighMem(page)) { |
171 | __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE); | 172 | size_t page_size = PAGE_SIZE << compound_order(page); |
173 | __cpuc_flush_dcache_area(page_address(page), page_size); | ||
172 | } else { | 174 | } else { |
173 | void *addr; | 175 | unsigned long i; |
174 | |||
175 | if (cache_is_vipt_nonaliasing()) { | 176 | if (cache_is_vipt_nonaliasing()) { |
176 | addr = kmap_atomic(page); | 177 | for (i = 0; i < (1 << compound_order(page)); i++) { |
177 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); | 178 | void *addr = kmap_atomic(page); |
178 | kunmap_atomic(addr); | ||
179 | } else { | ||
180 | addr = kmap_high_get(page); | ||
181 | if (addr) { | ||
182 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); | 179 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); |
183 | kunmap_high(page); | 180 | kunmap_atomic(addr); |
181 | } | ||
182 | } else { | ||
183 | for (i = 0; i < (1 << compound_order(page)); i++) { | ||
184 | void *addr = kmap_high_get(page); | ||
185 | if (addr) { | ||
186 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); | ||
187 | kunmap_high(page); | ||
188 | } | ||
184 | } | 189 | } |
185 | } | 190 | } |
186 | } | 191 | } |