On Wed, Jan 09, 2013 at 09:19:56PM +0000, Arnd Bergmann wrote: > On Wednesday 09 January 2013, Thierry Reding wrote: > > The I/O map cache is used to map large regions of physical memory in > > smaller chunks to avoid running out of vmalloc()/ioremap() space. > > > > Signed-off-by: Thierry Reding <thierry.red...@avionic-design.de> > > Can you explain why this is necessary and which problem it solves? > The implementation looks reasonable, but it's not clear to me if > we really need this new interface. > > In what cases does it actually save ioremap space?
I briefly described this in the cover letter of this series and didn't realize I hadn't put more information in this patch's commit message. What happens on Tegra is that we need to map 256 MiB of physical memory to access all the PCIe extended configuration space. However, ioremap() on such a large region fails if not enough vmalloc() space is available. This was observed when somebody tested this on CardHu which has a 1 GiB of RAM and therefore remapping the full 256 MiB fails. Thierry
pgpNdDkM4v_5C.pgp
Description: PGP signature