Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp291467pxb; Wed, 13 Jan 2021 03:53:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOqZaqOwo3kg7Bg/1drqLh7L3My3p9pyn+9Ujrr+D09Lu64o3cbiPCK2GpC04FygX/R1a4 X-Received: by 2002:a05:6402:4252:: with SMTP id g18mr1502889edb.231.1610538825391; Wed, 13 Jan 2021 03:53:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610538825; cv=none; d=google.com; s=arc-20160816; b=eS9mHQM3LhZkXicHsoDOiQGPOsb/Wmz51JKrTrV01UvBV0+U5gFO0HTC22GzHeyPsC e5K0TegjTeM9s2xENVtCajR1qVpxPv1LZ9lpmNO9a4aXzUMsatQjRcT3BAycQ7JoERwx rvp/DU2fJ1H8wBUHpgn8Y4y+sqlndIugNogS9SGvSN1JGcd5budLuwDbDbpLOVmVnbic CIz65vZYPAg7rLSeS8BFD4yBe9yIvzACQgSVW1mbYPsbgMU4p5v6wrhZydwNpdiHeDH7 ob0m5i0QM3kfmACAL1B4psbOMVS1GxEJg2q12Ra9GLOP7QDHGnxb4tg1Ql1BbeUpSnW1 Vqtg== 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=Vxp+HdlE7xByxWbgO7/tOuPB0Yh0OF3x2JWyeFbh3oI=; b=GxycSpulDazmf53bhR9Kb1FVFMm6po+daaipUs+nI1ZWZ/S3XI3BWYrG7E38ARCpuE uPsy0OGzclZ2mc43vcnu1v3Hm5qO2YhCinLXjnNLjfZDNp2ae1Z04udQt/UauSw/cdv3 /g+IeRtaPYogA36FwwtOAyTAZQAl4/vzQP9apq33wYoBA+yBPLiHpx5VSF4l4pmIRm4w f/otC3DxiZPr6GOb9f5pDHtANq2gm9sGzMIZ39UuWxur6UYqFcxnzbTIDVSfd64ttbAL Onq5WlbNgMpNM0QtdgwM/x/OGYqXqeMiowsmXUZ6k0zGvmkHMtm1SDrCxor7m2o2FQd2 l2yA== 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 g11si815256edt.456.2021.01.13.03.53.22; Wed, 13 Jan 2021 03:53:45 -0800 (PST) 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 S1727207AbhAMLwK (ORCPT + 99 others); Wed, 13 Jan 2021 06:52:10 -0500 Received: from verein.lst.de ([213.95.11.211]:59778 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725846AbhAMLwJ (ORCPT ); Wed, 13 Jan 2021 06:52:09 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id EFCD968AFE; Wed, 13 Jan 2021 12:51:26 +0100 (CET) Date: Wed, 13 Jan 2021 12:51:26 +0100 From: Christoph Hellwig To: Greg KH Cc: Claire Chang , robh+dt@kernel.org, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, joro@8bytes.org, will@kernel.org, frowand.list@gmail.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com, jgross@suse.com, sstabellini@kernel.org, hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com, grant.likely@arm.com, xypron.glpk@gmx.de, treding@nvidia.com, mingo@kernel.org, bauerman@linux.ibm.com, peterz@infradead.org, saravanak@google.com, rafael.j.wysocki@intel.com, heikki.krogerus@linux.intel.com, andriy.shevchenko@linux.intel.com, rdunlap@infradead.org, dan.j.williams@intel.com, bgolaszewski@baylibre.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, iommu@lists.linux-foundation.org, xen-devel@lists.xenproject.org, tfiga@chromium.org, drinkcat@chromium.org Subject: Re: [RFC PATCH v3 2/6] swiotlb: Add restricted DMA pool Message-ID: <20210113115126.GB29376@lst.de> References: <20210106034124.30560-1-tientzu@chromium.org> <20210106034124.30560-3-tientzu@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 06, 2021 at 08:50:03AM +0100, Greg KH wrote: > > --- a/include/linux/device.h > > +++ b/include/linux/device.h > > @@ -413,6 +413,7 @@ struct dev_links_info { > > * @dma_pools: Dma pools (if dma'ble device). > > * @dma_mem: Internal for coherent mem override. > > * @cma_area: Contiguous memory area for dma allocations > > + * @dma_io_tlb_mem: Internal for swiotlb io_tlb_mem override. > > Why does this have to be added here? Shouldn't the platform-specific > code handle it instead? The whole code added here is pretty generic. What we need to eventually do, though is to add a separate dma_device instead of adding more and more bloat to struct device.