arm: mm: fix dcache flush logic for compound high pages
PATCH v2 1/1 arm: 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 patch corrects the logic such that all constituent pages are now flushed.
---
V2: style change use page + i rather than separate struct *cpage
--- arch/arm/mm/flush.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mm/flush.c +3 -3
@@ -175,16 +175,16 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page)unsigned long i;if (cache_is_vipt_nonaliasing ()) {for (i =0 ; i < (1 <<compound_order (page)); i++) { -void *addr =kmap_atomic (page); +void *addr =kmap_atomic (page + i);__cpuc_flush_dcache_area (addr,PAGE_SIZE );kunmap_atomic (addr); } }else {for (i =0 ; i < (1 <<compound_order (page)); i++) { -void *addr =kmap_high_get (page); +void *addr =kmap_high_get (page + i);if (addr) {__cpuc_flush_dcache_area (addr,PAGE_SIZE ); -kunmap_high (page); +kunmap_high (page + i); } } }
Signature · 1 line
1.8.1.4
PATCH v2 1/1 arm: mm: fix dcache flush logic for compound high pages
Quoted 6 lines · Steve Capper
When given a compound high page,
__flush_dcache_pagewill only flush the first page of the compound page repeatedly rather than the entire set of constituent pages.This patch corrects the logic such that all constituent pages are now flushed.
Since this probably wants to go to -stable, it's worth mentioning the commit which introduced it in the commit text.
Quoted 4 lines
Signed-off-by Steve Capper <[email protected]>---
V2: style change use page + i rather than separate struct *cpage
---
Cheers Steve.
Will
PATCH v2 1/1 arm: mm: fix dcache flush logic for compound high pages
Quoted 16 lines · Will Deacon
Quoted 6 lines · Steve Capper
When given a compound high page,
__flush_dcache_pagewill only flush the first page of the compound page repeatedly rather than the entire set of constituent pages.This patch corrects the logic such that all constituent pages are now flushed.
Since this probably wants to go to -stable, it's worth mentioning the commit which introduced it in the commit text.
Quoted 4 lines
Signed-off-by Steve Capper <[email protected]>---
V2: style change use page + i rather than separate struct *cpage
---
Quoted 5 lines
Acked-by Will Deacon <[email protected]>Cheers Steve.
Will
Ta Will,
That's in Russell's system as: 7923/1
Signature · 1 line
Steve