From: Benjamin Herrenschmidt Date: Mon, 20 May 2013 17:25:15 +0000 (+0000) Subject: powerpc/powernv: Fix condition for when to invalidate the TCE cache X-Git-Tag: v5.15~20039^2~4 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=605e44d6e6f9b0c9ca8842dc0eb3ad032a463bdb;p=mirror_ubuntu-kernels.git powerpc/powernv: Fix condition for when to invalidate the TCE cache 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 --- diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c index 163bd7422f1c..098d3573315c 100644 --- a/arch/powerpc/platforms/powernv/pci.c +++ b/arch/powerpc/platforms/powernv/pci.c @@ -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); }