linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] io_remap_pfn_range: intro.
@ 2005-03-18 19:25 Randy.Dunlap
  2005-03-18 19:32 ` [PATCH 3/4] io_remap_pfn_range: fix some callers for XEN Randy.Dunlap
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Randy.Dunlap @ 2005-03-18 19:25 UTC (permalink / raw)
  To: lkml, linux-mm
  Cc: akpm, davem, wli, riel, kurt, Keir.Fraser, Ian.Pratt, Christian.Limpach

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>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-04-20  1:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-18 19:25 [PATCH 0/4] io_remap_pfn_range: intro Randy.Dunlap
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox