Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Nishanth Aravamudan and committed by
Benjamin Herrenschmidt
22b38298 4ae7ebe9

+1
+1
arch/powerpc/platforms/pseries/iommu.c
··· 382 382 rc = plpar_tce_stuff((u64)be32_to_cpu(maprange->liobn), 383 383 dma_offset, 384 384 0, limit); 385 + next += limit * tce_size; 385 386 num_tce -= limit; 386 387 } while (num_tce > 0 && !rc); 387 388