From patchwork Wed Jun 27 07:26:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Neuling X-Patchwork-Id: 167558 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 23DA91010D0 for ; Wed, 27 Jun 2012 17:27:24 +1000 (EST) Received: by ozlabs.org (Postfix) id 5B1F91007FC; Wed, 27 Jun 2012 17:26:38 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from localhost.localdomain (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 209221007EC; Wed, 27 Jun 2012 17:26:38 +1000 (EST) Received: by localhost.localdomain (Postfix, from userid 1000) id D2707D42E03; Wed, 27 Jun 2012 17:26:37 +1000 (EST) Received: from neuling.org (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id D020BD41F52; Wed, 27 Jun 2012 17:26:37 +1000 (EST) From: Michael Neuling To: benh@kernel.crashing.org X-GPG-Fingerprint: 9B25 DC2A C58D 2C8D 47C2 457E 0887 E86F 32E6 BE16 X-GPG-Fingerprint: 9365 87D7 A7EF 4721 420B 91D9 CD5B 874B EAC1 B3F5 MIME-Version: 1.0 Subject: [PATCH] powerpc/pseries: fix software invalidate TCE X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.3.1 Date: Wed, 27 Jun 2012 17:26:37 +1000 Message-ID: <17260.1340781997@neuling.org> Cc: linuxppc-dev@ozlabs.org, miltonm@bga.com X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15rc1 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The following added support for powernv but broke pseries/BML: 1f1616e powerpc/powernv: Add TCE SW invalidation support TCE_PCI_SW_INVAL was split into FREE and CREATE flags but the tests in the pseries code were not updated to reflect this. Signed-off-by: Michael Neuling cc: stable@kernel.org (v3.3-v3.4) diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 0915b1a..2d311c0 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -106,7 +106,7 @@ static int tce_build_pSeries(struct iommu_table *tbl, long index, tcep++; } - if (tbl->it_type == TCE_PCI_SWINV_CREATE) + if (tbl->it_type & TCE_PCI_SWINV_CREATE) tce_invalidate_pSeries_sw(tbl, tces, tcep - 1); return 0; } @@ -121,7 +121,7 @@ static void tce_free_pSeries(struct iommu_table *tbl, long index, long npages) while (npages--) *(tcep++) = 0; - if (tbl->it_type == TCE_PCI_SWINV_FREE) + if (tbl->it_type & TCE_PCI_SWINV_FREE) tce_invalidate_pSeries_sw(tbl, tces, tcep - 1); }