linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: lkml <linux-kernel@vger.kernel.org>, linux-mm@kvack.org
Cc: akpm <akpm@osdl.org>,
	davem@davemloft.net, wli <wli@holomorphy.com>,
	riel@redhat.com, kurt@garloff.de, Keir.Fraser@cl.cam.ac.uk,
	Ian.Pratt@cl.cam.ac.uk, Christian.Limpach@cl.cam.ac.uk
Subject: [PATCH 0/4] io_remap_pfn_range: intro.
Date: Fri, 18 Mar 2005 11:25:45 -0800	[thread overview]
Message-ID: <20050318112545.6f5f7635.rddunlap@osdl.org> (raw)

This is a combination of io_remap_pfn_range patches posted in the
last week or so by Keir Fraser and me.

This description is mostly from Keir's original post.


This patch introduces a new interface function for mapping bus/device
memory: io_remap_pfn_range. This accepts the same parameters as
remap_pfn_range and io_remap_page_range but should be used in any
situation where the caller is not simply remapping ordinary RAM.
For example, when mapping device registers the new function should be used.

The distinction between remapping device memory and ordinary RAM is
critical for the Xen hypervisor.

This patch series also cleans up the remaining users of
io_remap_page_range (in particular, the several sparc-specific
sections in various drivers that use a special form of io_remap_page_range:
an extra <iospace> argument for SPARC arch.) by converting them to
use io_remap_pfn_range(), where io_remap_pfn_range() supports
passing <iospace> as part of the pfn argument.

The sparc32 & sparc64 code needs live testing.


(from Keir:)
I have audited the drivers/ and sound/ directories. Most uses of
remap_pfn_range are okay, but there are a small handful that are
remapping device memory (mostly AGP and DRM drivers).

Of particular driver is the HPET driver, whose mmap function is broken
even for native (non-Xen) builds. If nothing else, vmalloc_to_phys
should be used instead of __pa to convert an ioremapped virtual
address to a valid physical address. The fix in this patch is to
remember the original bus address as probed at boot time and to pass
this to io_remap_pfn_range.


---
~Randy
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

             reply	other threads:[~2005-03-18 19:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-18 19:25 Randy.Dunlap [this message]
2005-03-18 19:32 ` [PATCH 3/4] io_remap_pfn_range: fix some callers for XEN Randy.Dunlap
2005-03-18 19:33 ` [PATCH 1/4] io_remap_pfn_range: add for all arch-es Randy.Dunlap
2005-03-18 22:55   ` Paul Mackerras
2005-03-18 23:19     ` Randy.Dunlap
2005-03-18 19:34 ` [PATCH 2/4] io_remap_pfn_range: convert sparc callers Randy.Dunlap
2005-03-18 19:35 ` [PATCH 4/4] io_remap_pfn_range: convert last callers Randy.Dunlap
2005-03-18 20:56 ` [PATCH 0/4] io_remap_pfn_range: intro David S. Miller
2005-04-20  1:38   ` William Lee Irwin III
2005-04-20  1:37 ` William Lee Irwin III

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=20050318112545.6f5f7635.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=Christian.Limpach@cl.cam.ac.uk \
    --cc=Ian.Pratt@cl.cam.ac.uk \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=kurt@garloff.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.com \
    --cc=wli@holomorphy.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