linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] arm: mm: fix dcache flush logic for compound high pages
@ 2013-12-16 15:03 Steve Capper
  2013-12-16 15:54 ` Will Deacon
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Capper @ 2013-12-16 15:03 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Steve Capper <steve.capper@linaro.org>
---
V2: style change use page + i rather than separate struct *cpage
---
 arch/arm/mm/flush.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index 6d5ba9a..3387e60 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)
 		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);
 				}
 			}
 		}
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH V2] arm: mm: fix dcache flush logic for compound high pages
  2013-12-16 15:03 [PATCH V2] arm: mm: fix dcache flush logic for compound high pages Steve Capper
@ 2013-12-16 15:54 ` Will Deacon
  2013-12-16 16:28   ` Steve Capper
  0 siblings, 1 reply; 3+ messages in thread
From: Will Deacon @ 2013-12-16 15:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 16, 2013 at 03:03:43PM +0000, Steve Capper wrote:
> 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.

Since this probably wants to go to -stable, it's worth mentioning the commit
which introduced it in the commit text.

> Signed-off-by: Steve Capper <steve.capper@linaro.org>
> ---
> V2: style change use page + i rather than separate struct *cpage
> ---

  Acked-by: Will Deacon <will.deacon@arm.com>

Cheers Steve.

Will

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH V2] arm: mm: fix dcache flush logic for compound high pages
  2013-12-16 15:54 ` Will Deacon
@ 2013-12-16 16:28   ` Steve Capper
  0 siblings, 0 replies; 3+ messages in thread
From: Steve Capper @ 2013-12-16 16:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 16, 2013 at 03:54:04PM +0000, Will Deacon wrote:
> On Mon, Dec 16, 2013 at 03:03:43PM +0000, Steve Capper wrote:
> > 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.
> 
> Since this probably wants to go to -stable, it's worth mentioning the commit
> which introduced it in the commit text.
> 
> > Signed-off-by: Steve Capper <steve.capper@linaro.org>
> > ---
> > V2: style change use page + i rather than separate struct *cpage
> > ---
> 
>   Acked-by: Will Deacon <will.deacon@arm.com>
> 
> Cheers Steve.
> 
> Will

Ta Will,
That's in Russell's system as: 7923/1

-- 
Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-16 16:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-16 15:03 [PATCH V2] arm: mm: fix dcache flush logic for compound high pages Steve Capper
2013-12-16 15:54 ` Will Deacon
2013-12-16 16:28   ` Steve Capper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).