aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Capper <steve.capper@linaro.org>2013-12-16 11:25:52 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-12-29 07:46:08 -0500
commit2a7cfcbc0553365d75716f69ee7b704cac7c9248 (patch)
tree0300f36101d0b5dfb9135722053780d232536fed
parent4ff859fe1dc0da0f87bbdfff78f527898878fa4a (diff)
ARM: 7923/1: mm: fix dcache flush logic for compound high pages
When given a compound high page, __flush_dcache_page will only flush the first page of the compound page repeatedly rather than the entire set of constituent pages. This error was introduced by: 0b19f93 ARM: mm: Add support for flushing HugeTLB pages. This patch corrects the logic such that all constituent pages are now flushed. Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Steve Capper <steve.capper@linaro.org> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mm/flush.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index 6d5ba9afb16a..3387e60e4ea3 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -175,16 +175,16 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page)
175 unsigned long i; 175 unsigned long i;
176 if (cache_is_vipt_nonaliasing()) { 176 if (cache_is_vipt_nonaliasing()) {
177 for (i = 0; i < (1 << compound_order(page)); i++) { 177 for (i = 0; i < (1 << compound_order(page)); i++) {
178 void *addr = kmap_atomic(page); 178 void *addr = kmap_atomic(page + i);
179 __cpuc_flush_dcache_area(addr, PAGE_SIZE); 179 __cpuc_flush_dcache_area(addr, PAGE_SIZE);
180 kunmap_atomic(addr); 180 kunmap_atomic(addr);
181 } 181 }
182 } else { 182 } else {
183 for (i = 0; i < (1 << compound_order(page)); i++) { 183 for (i = 0; i < (1 << compound_order(page)); i++) {
184 void *addr = kmap_high_get(page); 184 void *addr = kmap_high_get(page + i);
185 if (addr) { 185 if (addr) {
186 __cpuc_flush_dcache_area(addr, PAGE_SIZE); 186 __cpuc_flush_dcache_area(addr, PAGE_SIZE);
187 kunmap_high(page); 187 kunmap_high(page + i);
188 } 188 }
189 } 189 }
190 } 190 }