Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6fbb618f authored by Paul Mackerras's avatar Paul Mackerras
Browse files

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: default avatarPaul Mackerras <paulus@samba.org>
parent e8a167ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -146,7 +146,7 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
	union tce_entry tce, *tcep;
	union tce_entry tce, *tcep;
	long l, limit;
	long l, limit;


	if (npages == 1)
	if (TCE_PAGE_FACTOR == 0 && npages == 1)
		return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
		return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
					   direction);
					   direction);