Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp227875pxj; Wed, 16 Jun 2021 00:40:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2ot1Wr0L1aTsYvabmPATp1QmuILUqqvH0/N1FCI4KI61dwmaQVnS0lZrjNl8/b0ZGcfIh X-Received: by 2002:a92:c041:: with SMTP id o1mr2747919ilf.117.1623829251316; Wed, 16 Jun 2021 00:40:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623829251; cv=none; d=google.com; s=arc-20160816; b=cKRBDC6cxx8R4A/UKvaQCMoBvS10+s0FifvWO440LWxLZufyQN3c0NHGkQl6ZxzPUe cwUhFjrWt4OASugisRHmwb9qytS9pWUb1Sbv5U5h+U/38pfwkTFP90u/DLcyZ0s4Bu7z utPXmZMv7qkzxKObf4uH5LbpQ4J0SJUl5LKK90nGfltpvi6VfpMcXyE8OaLmZket+PWI IDgjORA+wEHgKqyzc44I1xYFlVaHDclSror4giS1AT89D4eGIN2H6OLjLfYWVTWaonNl JssLtO9dZPGyL/wlBz/GoFjxsyLZN452hBlCPApmWtCF4mE6+sZ2PMAIzb3vxLXAkRNE 7DOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=bcEuiNJOLu9OxtdjDs9f+94VyGViyPSG67t0Lfagjvc=; b=oihB8ZZwrs9DIbg6Rf4cPFsKvXW16zxRBj81yUwn324iObUwkpLFEIs1K89nZmUzbz OG64MEHHR8tgp/1bDYl/oyqLIvpFPJhBXd8LGNYJHkBRr1lts6cJOWmvcyszWhD0dk2G DX2fb5fLtdDCEMPGjy2JM4fit1fcVDamOCaqwEcDYEl9PTEY381hjZzVemWJRAhdPDWC O56MMW+11nb7ozMN8FEfAxNA8IpOSTXXjbRGAY6M3dYlj+mrfY5Sr7z45uFEFxVst8BM RjsKOhWTUILUtIOOWboVm/PW6gEftwHeYoXqT4suejkbm8WGnDx691UpB6Fzu9b+5Iqe novw== 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 d9si1912920jaf.45.2021.06.16.00.40.39; Wed, 16 Jun 2021 00:40:51 -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 S232052AbhFPHlx (ORCPT + 99 others); Wed, 16 Jun 2021 03:41:53 -0400 Received: from verein.lst.de ([213.95.11.211]:53033 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232038AbhFPHlu (ORCPT ); Wed, 16 Jun 2021 03:41:50 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 329CC68B05; Wed, 16 Jun 2021 09:39:42 +0200 (CEST) Date: Wed, 16 Jun 2021 09:39:42 +0200 From: Christoph Hellwig To: Claire Chang Cc: Rob Herring , mpe@ellerman.id.au, Joerg Roedel , Will Deacon , Frank Rowand , Konrad Rzeszutek Wilk , boris.ostrovsky@oracle.com, jgross@suse.com, Christoph Hellwig , Marek Szyprowski , benh@kernel.crashing.org, paulus@samba.org, "list@263.net:IOMMU DRIVERS" , sstabellini@kernel.org, Robin Murphy , grant.likely@arm.com, xypron.glpk@gmx.de, Thierry Reding , mingo@kernel.org, bauerman@linux.ibm.com, peterz@infradead.org, Greg KH , Saravana Kannan , "Rafael J . Wysocki" , heikki.krogerus@linux.intel.com, Andy Shevchenko , Randy Dunlap , Dan Williams , Bartosz Golaszewski , linux-devicetree , lkml , linuxppc-dev@lists.ozlabs.org, xen-devel@lists.xenproject.org, Nicolas Boichat , Jim Quinlan , tfiga@chromium.org, bskeggs@redhat.com, bhelgaas@google.com, chris@chris-wilson.co.uk, daniel@ffwll.ch, airlied@linux.ie, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, jani.nikula@linux.intel.com, jxgao@google.com, joonas.lahtinen@linux.intel.com, linux-pci@vger.kernel.org, maarten.lankhorst@linux.intel.com, matthew.auld@intel.com, rodrigo.vivi@intel.com, thomas.hellstrom@linux.intel.com Subject: Re: [PATCH v12 09/12] swiotlb: Add restricted DMA alloc/free support Message-ID: <20210616073942.GB2326@lst.de> References: <20210616062157.953777-1-tientzu@chromium.org> <20210616062157.953777-10-tientzu@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210616062157.953777-10-tientzu@chromium.org> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 16, 2021 at 02:21:54PM +0800, Claire Chang wrote: > Add the functions, swiotlb_{alloc,free} and is_swiotlb_for_alloc to > support the memory allocation from restricted DMA pool. > > The restricted DMA pool is preferred if available. > > Note that since coherent allocation needs remapping, one must set up > another device coherent pool by shared-dma-pool and use > dma_alloc_from_dev_coherent instead for atomic coherent allocation. > > Signed-off-by: Claire Chang Looks good, Reviewed-by: Christoph Hellwig