From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Nicolas Pitre <nico@cam.org>, lkml <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org
Subject: Re: [RFC] atomic highmem kmap page pinning
Date: Thu, 5 Mar 2009 22:59:21 +0000 [thread overview]
Message-ID: <20090305225921.GE918@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <28c262360903051423g1fbf5067i9835099d4bf324ae@mail.gmail.com>
On Fri, Mar 06, 2009 at 07:23:44AM +0900, Minchan Kim wrote:
> > +#ifdef ARCH_NEEDS_KMAP_HIGH_GET
> > +/**
> > + * kmap_high_get - pin a highmem page into memory
> > + * @page: &struct page to pin
> > + *
> > + * Returns the page's current virtual memory address, or NULL if no mapping
> > + * exists. When and only when a non null address is returned then a
> > + * matching call to kunmap_high() is necessary.
> > + *
> > + * This can be called from any context.
> > + */
> > +void *kmap_high_get(struct page *page)
> > +{
> > + unsigned long vaddr, flags;
> > +
> > + spin_lock_kmap_any(flags);
> > + vaddr = (unsigned long)page_address(page);
> > + if (vaddr) {
> > + BUG_ON(pkmap_count[PKMAP_NR(vaddr)] < 1);
> > + pkmap_count[PKMAP_NR(vaddr)]++;
> > + }
> > + spin_unlock_kmap_any(flags);
> > + return (void*) vaddr;
> > +}
> > +#endif
>
> Let's add empty function for architecture of no ARCH_NEEDS_KMAP_HIGH_GET,
The reasoning being?
next prev parent reply other threads:[~2009-03-05 22:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 5:58 Nicolas Pitre
2009-03-04 7:39 ` Andrew Morton
2009-03-04 8:14 ` Minchan Kim
2009-03-04 17:26 ` Nicolas Pitre
2009-03-04 23:07 ` Minchan Kim
2009-03-04 23:46 ` Russell King - ARM Linux
2009-03-05 0:25 ` Minchan Kim
2009-03-05 0:30 ` Minchan Kim
2009-03-05 2:37 ` Nicolas Pitre
2009-03-05 4:20 ` Minchan Kim
2009-03-05 4:57 ` Nicolas Pitre
2009-03-05 22:23 ` Minchan Kim
2009-03-05 22:59 ` Russell King - ARM Linux [this message]
2009-03-05 23:14 ` Minchan Kim
2009-03-07 22:28 ` Nicolas Pitre
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=20090305225921.GE918@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
--cc=nico@cam.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
all inboxes | Powered by JetHome®