All of lore.kernel.org
 help / color / mirror / Atom feed
From: steve.capper@linaro.org (Steve Capper)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] arm: mm: fix dcache flush logic for compound high pages
Date: Mon, 16 Dec 2013 15:07:41 +0000	[thread overview]
Message-ID: <20131216150740.GA1721@linaro.org> (raw)
In-Reply-To: <20131213163821.GL19177@mudshark.cambridge.arm.com>

On Fri, Dec 13, 2013 at 04:38:21PM +0000, Will Deacon wrote:
> On Fri, Dec 13, 2013 at 12:06:30PM +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.
> 
> Ha -- well spotted!
> 
/me looks around innocently
> > Signed-off-by: Steve Capper <steve.capper@linaro.org>
> > ---
> >  arch/arm/mm/flush.c | 11 ++++++-----
> >  1 file changed, 6 insertions(+), 5 deletions(-)
> > 
> > diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
> > index 6d5ba9a..4962302 100644
> > --- a/arch/arm/mm/flush.c
> > +++ b/arch/arm/mm/flush.c
> > @@ -173,18 +173,19 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page)
> >  		__cpuc_flush_dcache_area(page_address(page), page_size);
> >  	} else {
> >  		unsigned long i;
> > +		struct page *cpage = page;
> >  		if (cache_is_vipt_nonaliasing()) {
> > -			for (i = 0; i < (1 << compound_order(page)); i++) {
> > -				void *addr = kmap_atomic(page);
> > +			for (i = 0; i < (1 << compound_order(page)); cpage++, i++) {
> > +				void *addr = kmap_atomic(cpage);
> 
> Any reason not to use page + i?
> 

Thanks, that does look better with a page + i. I have sent a V2 patch
that includes this change:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-December/219571.html

If this looks okay should it go in the patch system? And I can add a
stable tag too?

Cheers,
-- 
Steve

> Will

  reply	other threads:[~2013-12-16 15:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13 12:06 [PATCH 0/2] Cache flush fixes Steve Capper
2013-12-13 12:06 ` [PATCH 1/2] arm: mm: fix dcache flush logic for compound high pages Steve Capper
2013-12-13 16:38   ` Will Deacon
2013-12-16 15:07     ` Steve Capper [this message]
2013-12-13 12:06 ` [PATCH 2/2] arm: cacheflush: Fix user split-caching logic Steve Capper
2013-12-13 12:41   ` Steve Capper
2013-12-13 12:51     ` Steve Capper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131216150740.GA1721@linaro.org \
    --to=steve.capper@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.