From: Paul Mackerras Date: Mon, 5 Dec 2005 03:19:10 +0000 (+1100) Subject: powerpc/pseries: Optimize IOMMU setup X-Git-Tag: v2.6.15-rc6~146^2~11 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6fbb618f5da0424adcba5f666035e4772a8df526;p=linux-2.6-omap-h63xx.git powerpc/pseries: Optimize IOMMU setup The previous commit will use the page-at-a-time hypervisor call for setting up IOMMU entries when we are using 64k pages and setting up one 64k page, even though that means 16 calls to the hypervisor, since the hypervisor still works on 4k pages. This optimizes this case by using the multi-page IOMMU setup hypervisor call instead. Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index fa1edbdcf88..2043659ea7b 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -146,7 +146,7 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, union tce_entry tce, *tcep; long l, limit; - if (npages == 1) + if (TCE_PAGE_FACTOR == 0 && npages == 1) return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, direction);