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=-14.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 89AE8C433E2 for ; Thu, 10 Sep 2020 13:10:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 536AB207FB for ; Thu, 10 Sep 2020 13:10:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729865AbgIJNIi (ORCPT ); Thu, 10 Sep 2020 09:08:38 -0400 Received: from foss.arm.com ([217.140.110.172]:35522 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730637AbgIJNFF (ORCPT ); Thu, 10 Sep 2020 09:05:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0AA5113D5; Thu, 10 Sep 2020 06:03:20 -0700 (PDT) Received: from [10.57.40.122] (unknown [10.57.40.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6C6D53F66E; Thu, 10 Sep 2020 06:03:17 -0700 (PDT) Subject: Re: [PATCH 08/12] dma-direct: use phys_to_dma_direct in dma_direct_alloc To: Christoph Hellwig , Tony Luck , Fenghua Yu , Thomas Bogendoerfer , iommu@lists.linux-foundation.org Cc: Tomasz Figa , Joerg Roedel , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org References: <20200908164758.3177341-1-hch@lst.de> <20200908164758.3177341-9-hch@lst.de> From: Robin Murphy Message-ID: <84dfb537-c028-e6d1-88d3-b3d48fc7df3a@arm.com> Date: Thu, 10 Sep 2020 14:03:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200908164758.3177341-9-hch@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-08 17:47, Christoph Hellwig wrote: > Replace the currently open code copy. Reviewed-by: Robin Murphy > Signed-off-by: Christoph Hellwig > --- > kernel/dma/direct.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c > index 12e9f5f75dfe4b..57a6e7d7cf8f16 100644 > --- a/kernel/dma/direct.c > +++ b/kernel/dma/direct.c > @@ -240,10 +240,7 @@ void *dma_direct_alloc(struct device *dev, size_t size, > goto out_encrypt_pages; > } > done: > - if (force_dma_unencrypted(dev)) > - *dma_handle = __phys_to_dma(dev, page_to_phys(page)); > - else > - *dma_handle = phys_to_dma(dev, page_to_phys(page)); > + *dma_handle = phys_to_dma_direct(dev, page_to_phys(page)); > return ret; > > out_encrypt_pages: > 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=-14.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 43125C433E2 for ; Thu, 10 Sep 2020 13:03:30 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A832D207FB for ; Thu, 10 Sep 2020 13:03:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A832D207FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3D47786EDF; Thu, 10 Sep 2020 13:03:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I48MrUjGpSwi; Thu, 10 Sep 2020 13:03:28 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 820A2868BB; Thu, 10 Sep 2020 13:03:28 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6F0F6C0859; Thu, 10 Sep 2020 13:03:28 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id CCE96C0051 for ; Thu, 10 Sep 2020 13:03:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8110A81E34 for ; Thu, 10 Sep 2020 13:03:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Y16o8IKucL3 for ; Thu, 10 Sep 2020 13:03:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by fraxinus.osuosl.org (Postfix) with ESMTP id 96CDE8712A for ; Thu, 10 Sep 2020 13:03:25 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0AA5113D5; Thu, 10 Sep 2020 06:03:20 -0700 (PDT) Received: from [10.57.40.122] (unknown [10.57.40.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6C6D53F66E; Thu, 10 Sep 2020 06:03:17 -0700 (PDT) Subject: Re: [PATCH 08/12] dma-direct: use phys_to_dma_direct in dma_direct_alloc To: Christoph Hellwig , Tony Luck , Fenghua Yu , Thomas Bogendoerfer , iommu@lists.linux-foundation.org References: <20200908164758.3177341-1-hch@lst.de> <20200908164758.3177341-9-hch@lst.de> From: Robin Murphy Message-ID: <84dfb537-c028-e6d1-88d3-b3d48fc7df3a@arm.com> Date: Thu, 10 Sep 2020 14:03:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200908164758.3177341-9-hch@lst.de> Content-Language: en-GB Cc: linux-ia64@vger.kernel.org, linux-doc@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On 2020-09-08 17:47, Christoph Hellwig wrote: > Replace the currently open code copy. Reviewed-by: Robin Murphy > Signed-off-by: Christoph Hellwig > --- > kernel/dma/direct.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c > index 12e9f5f75dfe4b..57a6e7d7cf8f16 100644 > --- a/kernel/dma/direct.c > +++ b/kernel/dma/direct.c > @@ -240,10 +240,7 @@ void *dma_direct_alloc(struct device *dev, size_t size, > goto out_encrypt_pages; > } > done: > - if (force_dma_unencrypted(dev)) > - *dma_handle = __phys_to_dma(dev, page_to_phys(page)); > - else > - *dma_handle = phys_to_dma(dev, page_to_phys(page)); > + *dma_handle = phys_to_dma_direct(dev, page_to_phys(page)); > return ret; > > out_encrypt_pages: > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Murphy Date: Thu, 10 Sep 2020 13:03:14 +0000 Subject: Re: [PATCH 08/12] dma-direct: use phys_to_dma_direct in dma_direct_alloc Message-Id: <84dfb537-c028-e6d1-88d3-b3d48fc7df3a@arm.com> List-Id: References: <20200908164758.3177341-1-hch@lst.de> <20200908164758.3177341-9-hch@lst.de> In-Reply-To: <20200908164758.3177341-9-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Christoph Hellwig , Tony Luck , Fenghua Yu , Thomas Bogendoerfer , iommu@lists.linux-foundation.org Cc: Tomasz Figa , Joerg Roedel , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org On 2020-09-08 17:47, Christoph Hellwig wrote: > Replace the currently open code copy. Reviewed-by: Robin Murphy > Signed-off-by: Christoph Hellwig > --- > kernel/dma/direct.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c > index 12e9f5f75dfe4b..57a6e7d7cf8f16 100644 > --- a/kernel/dma/direct.c > +++ b/kernel/dma/direct.c > @@ -240,10 +240,7 @@ void *dma_direct_alloc(struct device *dev, size_t size, > goto out_encrypt_pages; > } > done: > - if (force_dma_unencrypted(dev)) > - *dma_handle = __phys_to_dma(dev, page_to_phys(page)); > - else > - *dma_handle = phys_to_dma(dev, page_to_phys(page)); > + *dma_handle = phys_to_dma_direct(dev, page_to_phys(page)); > return ret; > > out_encrypt_pages: >