Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1060538pxk; Thu, 10 Sep 2020 06:11:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzqlDYB3MCKFdBh8ai9PiS0MHwTAkF78txk/sWacI4rj0QFuYDneBBfTQ1VnoLc5QeNJC4 X-Received: by 2002:a17:906:bb07:: with SMTP id jz7mr8196190ejb.399.1599743514349; Thu, 10 Sep 2020 06:11:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599743514; cv=none; d=google.com; s=arc-20160816; b=oK+oqRfE0EPQWvtCogiM17XKCJJfMWAyO/tUahYQOzPbeX47o3DR352nYc1QUU0eC0 380t7An82Tycm5ZFcmsskBUGrabXaaICEOXjRACyUu2FYmIPlKi5amDnxYQLDnAi/ePU +Ya0D9TkPEmixgAJs36zdiPu7k3SeKvIQxUgADuF5YQwhn0EX4a8uWPa/4DB9TNs2wEJ pe54u5cM3gR5lnNP/GgOiFDjjtvc6mFqxojV/pDLFoFGsFR5PudWn0gv1WkVCKtXbcqb hqRrvMD72QcyLnc/Vf9WIFLGnKCR1DXw+gFUJ/WM6dYQ4agQwhC+sAm7unZp9/hi0SOH L+xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=xfk0B09oxOLNwTgsklCIFiBS3zxHdqXb5E5pMghkLPI=; b=Mr9k9Yx3QsVwHl2sqSKR64Tk6C53PAhTkilHJRx1PaJB3c8VMoHv6OJoay3YsQk8MP kLlVqJxCUIXIdaSAGcVWFp7exvX52rvnlgAUj/hTMORn8lZAhuwXZRGGY8v2ik+Tr/LM lP667XaWmNzsSeKhB3BUB302JBfMFUchaUp4hnB/m0IRk1CwfMnM6PfW/YCKCizTFstx GFtJnFMNd47SBQ2uzw7DDRcaJx4jh6Cw+O0exJ4H61kE0l6coE29Nq3inJ1LoMPererG 8Jo77mVblAIywAq2RuJ+/7Q1zuEpIhNi77kqCVRqZLcYrbIZjEixU8lRmnsLZf5Q5VDM 9IjQ== 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 z5si3420048ejj.403.2020.09.10.06.11.30; Thu, 10 Sep 2020 06:11:54 -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 S1730204AbgIJNH5 (ORCPT + 99 others); Thu, 10 Sep 2020 09:07:57 -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: >