Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5090314imu; Sat, 1 Dec 2018 08:58:02 -0800 (PST) X-Google-Smtp-Source: AFSGD/XLPd38AEUBfHh2DXq/zE3cSH1jcM7HTURL6btJvRk7ozYb0JsGJndFwsEO1dT9LQVqhYnu X-Received: by 2002:a63:f141:: with SMTP id o1mr7207360pgk.134.1543683482779; Sat, 01 Dec 2018 08:58:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543683482; cv=none; d=google.com; s=arc-20160816; b=byads4T6FCHcVimEZRWAcz/nyBs5zAoGnuCK7jpvAVBZMWUKa3Wdt3tcMUIK/PfBRP X2KyXbDhht4sOYnc5TAhGTtRdXLKzJ5G+cX/iMvy2oWDcAmqOZfXwPZ8g0qiLwNaeKX7 L6HCv5mYIU8UpbE9CLMssHuOBIQn4Cl0QxlqYOwjD5GRpWhwSb/GTV3mks5rRyPMC9So vFfDdsNHaiKgcGzHmD4016nnulmM/+kvt6zBoDuYbOWUBleWZdqXEgFOFAX3D12EkLgN zOPI4N0uwm990xLfPdfI7zFMZUfzbE5ARzLUR/FPkVODA+nECpbYjh5eDWOanbjrLYg6 lsVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xvmLUtQMxPnCt5y3Jkuf9V14umqWkgKJGQZPvDUygJo=; b=bSPl7YA2w4Jm3jQxkb42W5iSxoatLtEIbeEEWEfsHZCyTw4CNgPwEtI55lgTu0M467 U29lDT/l/WT3hNp84/R3A/3TQh1bnrZHX41w+cnpnsBfD6dNQCgEE5LUkudNHSvWqDbD So68glGdnQ6U87HKHakdeIGM/BQvHSZv6xwlUmUGD04u+S58y0yOj6bLhgmKynB5sfR1 /6fRmBeLI36qKg9Fcyel9Wzv7mjls7q2+pdXSoC0AnBXtwDPzB8F5gHCbIvOys+iH/MK 6Cof4ATlTs9U+IqT6dqRx/xiBKgFWoPVb9MxjcIiU7edMScp1nsZ58o0L3ZLn6FKebmV 914w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d14si8328373pgn.390.2018.12.01.08.57.47; Sat, 01 Dec 2018 08:58:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727139AbeLBEJI (ORCPT + 99 others); Sat, 1 Dec 2018 23:09:08 -0500 Received: from verein.lst.de ([213.95.11.211]:56753 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726788AbeLBEJI (ORCPT ); Sat, 1 Dec 2018 23:09:08 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id A5A076732A; Sat, 1 Dec 2018 17:56:10 +0100 (CET) Date: Sat, 1 Dec 2018 17:56:10 +0100 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , iommu@lists.linux-foundation.org, Catalin Marinas , Will Deacon , Guo Ren , Laura Abbott , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/9] dma-direct: provide page based alloc/free helpers Message-ID: <20181201165610.GA20912@lst.de> References: <20181105121931.13481-1-hch@lst.de> <20181105121931.13481-2-hch@lst.de> <3b6439f3-fb7e-aaf7-01b9-b0fb03a27a69@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3b6439f3-fb7e-aaf7-01b9-b0fb03a27a69@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 30, 2018 at 07:04:41PM +0000, Robin Murphy wrote: > On 05/11/2018 12:19, Christoph Hellwig wrote: >> Some architectures support remapping highmem into DMA coherent >> allocations. To use the common code for them we need variants of >> dma_direct_{alloc,free}_pages that do not use kernel virtual addresses. > > FWIW it's as much about non-cacheable remapping of lowmem as it is about > highmem. Regardless, the diff looks OK to me. Yes, but as long as you remap lowmem the current interface work ok, but once you have highmem a kernel virtual address doesn't cut it, and we need a page struct or physical address.