From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 05/14] lib: Add I/O map cache implementation Date: Wed, 9 Jan 2013 22:54:28 +0100 Message-ID: <20130109215428.GA13648@avionic-0098.adnet.avionic-design.de> References: <1357764194-12677-1-git-send-email-thierry.reding@avionic-design.de> <1357764194-12677-6-git-send-email-thierry.reding@avionic-design.de> <201301092119.57067.arnd@arndb.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Return-path: Content-Disposition: inline In-Reply-To: <201301092119.57067.arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org To: Arnd Bergmann Cc: linux-tegra@vger.kernel.org, Grant Likely , Rob Herring , Russell King , Stephen Warren , Bjorn Helgaas , Andrew Murray , Jason Gunthorpe , Thomas Petazzoni , devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org List-Id: devicetree@vger.kernel.org --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > >=20 > > Signed-off-by: Thierry Reding >=20 > 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. >=20 > 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 --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIcBAEBAgAGBQJQ7ecUAAoJEN0jrNd/PrOhIvQQALeDgfHITFn5nEXC12ikivTh Ql9DWEKt8sqdDq8AQ6sDm6lnadmQyYB3OwvP0/I76s3GSJWzBRacjyTVRzQ4sBDb 3cOKPl4BHcXzifQKQqYB04XljdPSGmDsoUqQGVCprFb7uYgWv0xwaJrk6g1iKxGs wWDUHv7aND2yqombVTzzEZFC2mHahmTVrxftuSUeP3+lvL8TIeBZS+vf0ztr0A4M vTMPqcp6RO9omSC1VoLnh7uNNOBEVKhst2z2HFbh8INqPjAi4HAnHisb1lhCu1bN 1nP/hjV9lNglzViPvX5sf7CuAAzTlhHBvZU5yF3U7eNVtokNPRgs7m/RZFqzHTEy MuIGuhDrRpbYon8CpoDsgu/+TVNUmBvhrN5Eph8a/1bHI/65rQ1QY9n4/Ke8Gk+I +R//AolhiCpw9FJnKTG94flrH9EKLRWQU11FK/mjw42l32hdvsMm15LSYa5OAm1O EwK7n0X3hUscAti/BHEmygXd5c65EkMN0/x8v3dAMCn0YrJm5CfaSP2uq8VTtCvp YuFOgvJLn5OVsYcVTFAro1e+6sNTNwaVSewGkBrJYUReLJujgSgYsKrfL/wiGm5d UCWluDJX9iE2HvRbB4NyLhg7XTtK5RBYsS8dviA/4I8sV1wq3cm0WYe63tsmjb70 DFoD7KlRp+wWVH5K4IWR =EcR+ -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--