pseries/iommu: Fix iteration in DDW TCE clearrange
authorNishanth Aravamudan <nacc@linux.vnet.ibm.com>
Fri, 18 Jan 2013 09:16:24 +0000 (09:16 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 29 Jan 2013 00:35:08 +0000 (11:35 +1100)
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: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/iommu.c

index e2685badb5db1761c9621a486049361608f0742a..a55b6858ceacb3fc122a9a284503db7b8f90e81f 100644 (file)
@@ -382,6 +382,7 @@ static int tce_clearrange_multi_pSeriesLP(unsigned long start_pfn,
                rc = plpar_tce_stuff((u64)be32_to_cpu(maprange->liobn),
                                             dma_offset,
                                             0, limit);
+               next += limit * tce_size;
                num_tce -= limit;
        } while (num_tce > 0 && !rc);