From patchwork Sat Jun 23 23:54:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Pearson X-Patchwork-Id: 933820 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Ctyc6hFwz9s2R for ; Sun, 24 Jun 2018 10:50:48 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=raptorengineering.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=raptorengineering.com header.i=@raptorengineering.com header.b="ve0Iw9/q"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41Ctyc56jzzF153 for ; Sun, 24 Jun 2018 10:50:48 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=raptorengineering.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=raptorengineering.com header.i=@raptorengineering.com header.b="ve0Iw9/q"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=raptorengineering.com (client-ip=192.119.205.245; helo=mail.rptsys.com; envelope-from=tpearson@raptorengineering.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=raptorengineering.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=raptorengineering.com header.i=@raptorengineering.com header.b="ve0Iw9/q"; dkim-atps=neutral Received: from mail.rptsys.com (mail.rptsys.com [192.119.205.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41Csvx4wRHzF0Pd for ; Sun, 24 Jun 2018 10:03:25 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id A0D286428BE; Sat, 23 Jun 2018 18:54:37 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id p5yeG8gaOtdA; Sat, 23 Jun 2018 18:54:37 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 31DF46428C2; Sat, 23 Jun 2018 18:54:37 -0500 (CDT) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.rptsys.com 31DF46428C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raptorengineering.com; s=B8E824E6-0BE2-11E6-931D-288C65937AAD; t=1529798077; bh=4qAYiDs4bpnZuUO8IxOrl3cHmNY5zrTalu3/TXUCHV4=; h=Date:From:To:Message-ID:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding; b=ve0Iw9/qDsIn2AuGTDKjMSLDxyCEWarw/espOsWWM6Y4xlLKAFvDQJZi8EBDWshOW hOeKReK2v10Df25OvE8Evk0LzXdyZh7U+/BfHafzhm5EFvmzzWSagHi2FLeLS8Mz42 /p1M/CC2nnm2zHc4n9D5UNCk0uydjHgPVc4XQ9+s= X-Virus-Scanned: amavisd-new at rptsys.com Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2Iksm81gi3kI; Sat, 23 Jun 2018 18:54:37 -0500 (CDT) Received: from vali.starlink.edu (vali.starlink.edu [192.168.3.21]) by mail.rptsys.com (Postfix) with ESMTP id 029466428BE; Sat, 23 Jun 2018 18:54:37 -0500 (CDT) Date: Sat, 23 Jun 2018 18:54:36 -0500 (CDT) From: Timothy Pearson To: linuxppc-dev@lists.ozlabs.org Message-ID: <1298010887.2569253.1529798076885.JavaMail.zimbra@raptorengineeringinc.com> Subject: [PATCH 6/7] powerpc/powernv/pci: Invalidate TCE cache after DMA map MIME-Version: 1.0 X-Mailer: Zimbra 8.5.0_GA_3042 (ZimbraWebClient - FF3.6 (Linux)/8.5.0_GA_3042) Thread-Topic: powerpc/powernv/pci: Invalidate TCE cache after DMA map Thread-Index: XThkSZuk+06+kFPVOVAy0ZXBeX6nDA== X-Mailman-Approved-At: Sun, 24 Jun 2018 10:42:17 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Mackerras Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" setup Per the IODA2, TCEs must be invalidated after their settings have been changed. Invalidate the cache after the address is changed during TCE allocation when using pseudo DMA. Signed-off-by: Timothy Pearson --- arch/powerpc/platforms/powernv/pci-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-dma.c b/arch/powerpc/platforms/powernv/pci-dma.c index 237940a2a052..060dbc168401 100644 --- a/arch/powerpc/platforms/powernv/pci-dma.c +++ b/arch/powerpc/platforms/powernv/pci-dma.c @@ -42,8 +42,7 @@ static int dma_pseudo_bypass_select_tce(struct pnv_ioda_pe *pe, phys_addr_t addr new = cpu_to_be64(addr | TCE_PCI_READ | TCE_PCI_WRITE); pe->tces[tce] = new; mb(); - pe_info(pe, "allocating TCE %i 0x%016llx (old 0x%016llx)\n", - tce, new, old); + pnv_pci_ioda2_tce_invalidate_pe(pe); spin_unlock_irqrestore(&pe->tce_alloc_lock, flags); return tce;