public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org,
	Nicolas Pitre <nico@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: mm: clean-up in order to reduce to call kmap_high_get()
Date: Fri, 8 Mar 2013 09:51:17 +0900	[thread overview]
Message-ID: <20130308005117.GB19010@lge.com> (raw)
In-Reply-To: <20130307132623.GG17833@n2100.arm.linux.org.uk>

Hello, Russell.

On Thu, Mar 07, 2013 at 01:26:23PM +0000, Russell King - ARM Linux wrote:
> On Mon, Mar 04, 2013 at 01:50:09PM +0900, Joonsoo Kim wrote:
> > In kmap_atomic(), kmap_high_get() is invoked for checking already
> > mapped area. In __flush_dcache_page() and dma_cache_maint_page(),
> > we explicitly call kmap_high_get() before kmap_atomic()
> > when cache_is_vipt(), so kmap_high_get() can be invoked twice.
> > This is useless operation, so remove one.
> > 
> > Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> > 
> > diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
> > index c7e3759..b7711be 100644
> > --- a/arch/arm/mm/dma-mapping.c
> > +++ b/arch/arm/mm/dma-mapping.c
> > @@ -822,16 +822,16 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
> >  		if (PageHighMem(page)) {
> >  			if (len + offset > PAGE_SIZE)
> >  				len = PAGE_SIZE - offset;
> > -			vaddr = kmap_high_get(page);
> > -			if (vaddr) {
> > -				vaddr += offset;
> > -				op(vaddr, len, dir);
> > -				kunmap_high(page);
> > -			} else if (cache_is_vipt()) {
> > -				/* unmapped pages might still be cached */
> > +			if (cache_is_vipt()) {
> 
> This should be:
> 			if (cache_is_vipt_nonaliasing())
> 
> to make it _explicit_ that this technique is only for non-aliasing VIPT
> caches (this doesn't work on any other of our cache types.)  Yes, I
> know we don't support highmem with VIPT aliasing caches - but still,
> we should ensure that this is self-documented in this code.
> 
> Same for arch/arm/mm/flush.c

Okay. I will re-work and will send v2 soon.

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

      reply	other threads:[~2013-03-08  0:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04  4:50 [PATCH] ARM: mm: clean-up in order to reduce to call kmap_high_get() Joonsoo Kim
2013-03-05 14:23 ` Nicolas Pitre
2013-03-07 13:26 ` Russell King - ARM Linux
2013-03-08  0:51   ` Joonsoo Kim [this message]

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=20130308005117.GB19010@lge.com \
    --to=iamjoonsoo.kim@lge.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nico@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox