From: boris.brezillon@free-electrons.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] mm: add is_highmem_addr() helper
Date: Mon, 4 Apr 2016 17:05:58 +0200 [thread overview]
Message-ID: <20160404170558.0e3278b5@bbrezillon> (raw)
In-Reply-To: <57022253.70400@ti.com>
On Mon, 4 Apr 2016 13:44:11 +0530
Vignesh R <vigneshr@ti.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@free-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
next prev parent reply other threads:[~2016-04-04 15:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 12:29 [PATCH 0/4] scatterlist: sg_table from virtual pointer Boris Brezillon
2016-03-31 12:29 ` [PATCH 1/4] mm: add is_highmem_addr() helper Boris Brezillon
2016-04-04 8:14 ` Vignesh R
2016-04-04 15:05 ` Boris Brezillon [this message]
2016-03-31 12:29 ` [PATCH 2/4] scatterlist: add sg_alloc_table_from_buf() helper Boris Brezillon
2016-03-31 14:14 ` Russell King - ARM Linux
2016-03-31 14:45 ` Boris Brezillon
2016-03-31 15:09 ` Russell King - ARM Linux
2016-03-31 12:29 ` [PATCH 3/4] spi: use sg_alloc_table_from_buf() Boris Brezillon
2016-03-31 17:23 ` Mark Brown
2016-03-31 12:29 ` [PATCH 4/4] mtd: provide helper to prepare buffers for DMA operations Boris Brezillon
2016-04-01 3:13 ` kbuild test robot
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=20160404170558.0e3278b5@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--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 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).