]> Pileus Git - ~andy/linux/commitdiff
powerpc/powernv: Fix condition for when to invalidate the TCE cache
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 20 May 2013 17:25:15 +0000 (17:25 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 24 May 2013 08:13:44 +0000 (18:13 +1000)
We use two flags, one to indicate an invalidation is needed after
creating a new entry and one to indicate an invalidation is needed
after removing an entry. However we were testing the wrong flag
in the remove case.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/pci.c

index 163bd7422f1ca555d79a7a8bfe1734ca44fc98fb..098d3573315cd8ab63fbc1e6d50740c0fd0c1e73 100644 (file)
@@ -367,7 +367,7 @@ static void pnv_tce_free(struct iommu_table *tbl, long index, long npages)
        while (npages--)
                *(tcep++) = 0;
 
-       if (tbl->it_type & TCE_PCI_SWINV_CREATE)
+       if (tbl->it_type & TCE_PCI_SWINV_FREE)
                pnv_pci_ioda_tce_invalidate(tbl, tces, tcep - 1);
 }