RFC: Deprecating io_block_mapping
ebs at ebshome.net
Thu May 26 16:20:57 EST 2005
On Thu, May 26, 2005 at 02:00:11AM -0400, Dan Malek wrote:
> >Well, The PCI IO space base just need to be in a global that is
> >referenced by _IO_BASE, it works fine, no need to hard code a mapping.
> Sure you do. No one ioremap()s PCI IO space. It has to be hard wired
Dan, you must be kidding. 44x ioremaps PCI IO space, 40x uses
io_block_mapping for that, but this is just brain-damaged and should
What is so special about PCI IO space that it must be "wired" ?
> You are missing the point. The reason for io_block_mapping() isn't
> to allocate virtual space for someone, it's to _wire_ a space using an
> efficient mapping method so someone else can call ioremap() and
> get that wired access.
Wow, this is something new for me. So you are saying that
io_block_mapping() was supposed to be used with ioremap()?
Could you point me to the port which actually does this?
So far I only saw io_block_mapping() used as a short-cut way _NOT_ to
ioremap and get hard-coded v:p mapping and then use this knowledge to
access physical address directly without ever calling ioremap(). And
this is major source of problems.
Also, by this logic, if platform doesn't have BAT or CAMs or whatever,
which effectively prevents creating this "efficient mapping" and
hence stated purpose of io_block_mapping cannot be achieved,
io_block_mapping() should be eliminated on this platform, right?
More information about the Linuxppc-dev