From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3175FC4363A for ; Thu, 29 Oct 2020 01:53:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4B75206E9 for ; Thu, 29 Oct 2020 01:53:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728847AbgJ2BxV (ORCPT ); Wed, 28 Oct 2020 21:53:21 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:8280 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728801AbgJ2BxM (ORCPT ); Wed, 28 Oct 2020 21:53:12 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09T1YRTf153514; Wed, 28 Oct 2020 21:52:51 -0400 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 34ejc32p1q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Oct 2020 21:52:51 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09T1lUGk009482; Thu, 29 Oct 2020 01:52:49 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma05fra.de.ibm.com with ESMTP id 34cbw8am01-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Oct 2020 01:52:49 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09T1qlFE20447536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Oct 2020 01:52:47 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4403B11C04A; Thu, 29 Oct 2020 01:52:47 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E268611C050; Thu, 29 Oct 2020 01:52:46 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 29 Oct 2020 01:52:46 +0000 (GMT) Received: from bran.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) by ozlabs.au.ibm.com (Postfix) with ESMTP id C7BA4A01DA; Thu, 29 Oct 2020 12:52:45 +1100 (AEDT) Received: from fstn1-p1.ozlabs.ibm.com (fstn1-p1.ozlabs.ibm.com [10.61.161.111]) by bran.ozlabs.ibm.com (Postfix) with ESMTP id B5466E0104; Thu, 29 Oct 2020 12:52:45 +1100 (AEDT) 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 v4 0/2] DMA, powerpc/dma: Fallback to dma_ops when persistent memory present Date: Thu, 29 Oct 2020 12:52:39 +1100 Message-Id: <20201029015241.73920-1-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-10-28_09:2020-10-28,2020-10-28 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=1 mlxlogscore=212 priorityscore=1501 malwarescore=0 impostorscore=0 lowpriorityscore=0 clxscore=1034 adultscore=0 suspectscore=2 bulkscore=0 phishscore=0 mlxscore=1 spamscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010290002 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 https://lkml.org/lkml/2020/10/28/929 which replaces https://lkml.org/lkml/2020/10/27/418 which replaces https://lkml.org/lkml/2020/10/20/1085 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 mapped DMA operation powerpc/dma: Fallback to dma_ops when persistent memory present arch/powerpc/kernel/dma-iommu.c | 73 +++++++++++++++++++++++++- arch/powerpc/platforms/pseries/iommu.c | 51 ++++++++++++++---- kernel/dma/mapping.c | 26 +++++++-- arch/powerpc/Kconfig | 1 + kernel/dma/Kconfig | 4 ++ 5 files changed, 139 insertions(+), 16 deletions(-) -- 2.17.1