Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp124441pxx; Tue, 27 Oct 2020 23:46:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXwbhIqZPjuX9Tk9dsfSdNmTS2aNOQIVq8TwPQYdkkakcrFkXGTuQQX/NoIGmubvmrOAu2 X-Received: by 2002:a05:6402:4cb:: with SMTP id n11mr6193440edw.296.1603867571408; Tue, 27 Oct 2020 23:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603867571; cv=none; d=google.com; s=arc-20160816; b=NLIi8mbSKz9lMvbKF7EzQ1Rjn1aF4IgfUFD81m632Va5k0kjfLs//UNaYUHeWhZUJ3 bZDp5bLpfboX/FnB5Z3gvuG2I4F7U99cPwbyU5MAcj4YB8V51h/JPepAaxw/7/GmXxwG 4qdtVA2G88YYJKbNS+iyRva78iSHXDfJ0aku/bUMXxnlpLUyOKGI0uA7b4glhaNt9NDs X5KSU1quz9JpifXtTQQS58aa4EOyjXdqFOd0XNP6ok4EznjZxACAaDSRewh84Gj/7NUM ore0ybjLaOOHdEayiNnPiX5FEN5OXZY4/g7g44iCa5RsIsUCOKYD9P+Sc0CbGDvpkoO8 ppog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=OD4HcJoR/GGLYpf6et/uEu+OWBVpjhM7sm1UdlQsEIA=; b=SY+b/A/hMxixn0YIW4j5MOvfQgAYN5H/s9afozHDOSKqbuEIHpjXUvPJg6RLxOPkal VdXV63Rx5bevXNiZsn4MQE52HD2PbArRiGbGulikGK1KIEd5QXaFNKNdU95wbkOlZ/fG ZMILoxQ/BILuJ4G/Xjmphf2Pp9exettJKP4T4FBMgNoDbpoWJYhaaRtCtxziCudwqptM Vwm7T9lSptU54vOFmvUoiqlrjwssAdauD2mayu3hCALL3mWrzVlm0aShDoieCOrz2zip RSJ9fSwbswQYeh8AWvqgGDJP4zVnckHZZXs9hskK03Z4/I2i/rq1/U71QZEn5iUjdb8r sYrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n2si3177197edi.564.2020.10.27.23.45.49; Tue, 27 Oct 2020 23:46:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2897753AbgJ0KTX (ORCPT + 99 others); Tue, 27 Oct 2020 06:19:23 -0400 Received: from ozlabs.ru ([107.174.27.60]:46374 "EHLO ozlabs.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2897233AbgJ0KTX (ORCPT ); Tue, 27 Oct 2020 06:19:23 -0400 Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id DE5A7AE80276; Tue, 27 Oct 2020 06:18:07 -0400 (EDT) From: Alexey Kardashevskiy To: linuxppc-dev@lists.ozlabs.org Cc: Christoph Hellwig , Michael Ellerman , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Alexey Kardashevskiy Subject: [PATCH kernel v2 0/2] DMA, powerpc/dma: Fallback to dma_ops when persistent memory present Date: Tue, 27 Oct 2020 21:18:39 +1100 Message-Id: <20201027101841.96056-1-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This allows mixing direct DMA (to/from RAM) and IOMMU (to/from apersistent memory) on the PPC64/pseries platform. This replaces this: https://lkml.org/lkml/2020/10/20/1085 A lesser evil this is :) This is based on sha1 4525c8781ec0 Linus Torvalds "scsi: qla2xxx: remove incorrect sparse #ifdef". Please comment. Thanks. Alexey Kardashevskiy (2): dma: Allow mixing bypass and normal IOMMU operation powerpc/dma: Fallback to dma_ops when persistent memory present arch/powerpc/kernel/dma-iommu.c | 12 ++++- arch/powerpc/platforms/pseries/iommu.c | 44 ++++++++++++++----- kernel/dma/mapping.c | 61 +++++++++++++++++++++++++- arch/powerpc/Kconfig | 1 + kernel/dma/Kconfig | 4 ++ 5 files changed, 108 insertions(+), 14 deletions(-) -- 2.17.1