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

Commit 22b38298 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Benjamin Herrenschmidt
Browse files

pseries/iommu: Fix iteration in DDW TCE clearrange



tce_clearrange_multi_pSeriesLP is attempting to iterate over all TCEs in
a given range. However, is it not advancing the dma_offset value passed
to plpar_tce_stuff via the next value. This prevents DLPAR from
completing, because TCEs are still present at slot isolation time.

Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 4ae7ebe9
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -382,6 +382,7 @@ static int tce_clearrange_multi_pSeriesLP(unsigned long start_pfn,
		rc = plpar_tce_stuff((u64)be32_to_cpu(maprange->liobn),
		rc = plpar_tce_stuff((u64)be32_to_cpu(maprange->liobn),
					     dma_offset,
					     dma_offset,
					     0, limit);
					     0, limit);
		next += limit * tce_size;
		num_tce -= limit;
		num_tce -= limit;
	} while (num_tce > 0 && !rc);
	} while (num_tce > 0 && !rc);