[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 4 Apr 2016 17:05:58 +0200
From: Boris Brezillon <boris.brezillon@...e-electrons.com>
To: Vignesh R <vigneshr@...com>
Cc: David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
<linux-mtd@...ts.infradead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Dave Gordon <david.s.gordon@...el.com>,
Mark Brown <broonie@...nel.org>, <linux-spi@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
Vinod Koul <vinod.koul@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
<dmaengine@...r.kernel.org>,
Mauro Carvalho Chehab <m.chehab@...sung.com>,
Hans Verkuil <hans.verkuil@...co.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
<linux-media@...r.kernel.org>, Richard Weinberger <richard@....at>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
<linux-crypto@...r.kernel.org>, <linux-mm@...ck.org>,
Joerg Roedel <joro@...tes.org>,
<iommu@...ts.linux-foundation.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/4] mm: add is_highmem_addr() helper
On Mon, 4 Apr 2016 13:44:11 +0530
Vignesh R <vigneshr@...com> wrote:
> Hi,
>
> On 03/31/2016 05:59 PM, Boris Brezillon wrote:
> > Add an helper to check if a virtual address is in the highmem region.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@...e-electrons.com>
> > ---
> > include/linux/highmem.h | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/include/linux/highmem.h b/include/linux/highmem.h
> > index bb3f329..13dff37 100644
> > --- a/include/linux/highmem.h
> > +++ b/include/linux/highmem.h
> > @@ -41,6 +41,14 @@ void kmap_flush_unused(void);
> >
> > struct page *kmap_to_page(void *addr);
> >
> > +static inline bool is_highmem_addr(const void *x)
> > +{
> > + unsigned long vaddr = (unsigned long)x;
> > +
> > + return vaddr >= PKMAP_BASE &&
> > + vaddr < ((PKMAP_BASE + LAST_PKMAP) * PAGE_SIZE);
>
>
> Shouldn't this be:
> vaddr < (PKMAP_BASE + (LAST_PKMAP * PAGE_SIZE)) ?
Oops, yes indeed.
Anyway, given Russell's feedback I don't think I'm gonna follow up on
this series.
Sorry.
Boris
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Powered by blists - more mailing lists