From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Subject: pseries/iommu: Fix iteration in DDW TCE clearrange
Git-commit: 22b382985a2e213e4ea0b4e436df24ab7228961d
Patch-mainline: yes
References: bnc#793678 

    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>
Acked-by: Torsten Duwe <duwe@suse.de>

diff -urpN linux-3.0/arch/powerpc/platforms/pseries/iommu.c linux-3.0-ddw1/arch/powerpc/platforms/pseries/iommu.c
--- linux-3.0/arch/powerpc/platforms/pseries/iommu.c	2013-01-21 17:09:46.000000000 -0500
+++ linux-3.0-ddw1/arch/powerpc/platforms/pseries/iommu.c	2013-01-21 17:19:39.000000000 -0500
@@ -346,6 +346,7 @@ static int tce_clearrange_multi_pSeriesL
 		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);
 
