public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: brace@beardog.cce.hp.com
To: linux-kernel@vger.kernel.org
Cc: brace@beardog.cce.hp.com, scameron@beardog.cce.hp.com
Subject: How to create a kernel virtual mapping for physical addresses.
Date: Fri, 8 Apr 2011 17:03:21 -0500	[thread overview]
Message-ID: <20110408220321.GA777@beardog.cce.hp.com> (raw)

Given a physical address and a length (which may span contiguous pages), how
does one go about creating a virtual mapping for that address? That address may
be in high memory (above 4GB) in a 32bit system.

ioremap() wants a 32bit physical address on 32bit systems. kmap() and
kmap_atomic() wants a struct page which I am not sure how to get from a physical
address.

If there already is a kernel mapping, then using the existing kernel mapping
would be fine if I could figure out how to get it, but if there is not one,
then I need to make one.

I think setting the DMA mask to 32bit would mean that I do not have to deal
with highmem addresses in my particular case, but I still do not know how to
get a virtual address from a physical.

Any suggestions?

Don

             reply	other threads:[~2011-04-08 22:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 22:03 brace [this message]
2011-04-19 19:51 ` How to create a kernel virtual mapping for physical addresses Arnd Bergmann
     [not found]   ` <20110421184600.GA29746@beardog.cce.hp.com>
2011-04-21 19:36     ` Arnd Bergmann

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=20110408220321.GA777@beardog.cce.hp.com \
    --to=brace@beardog.cce.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=scameron@beardog.cce.hp.com \
    /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