Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp316358pxb; Wed, 13 Jan 2021 04:32:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5EkLAhFsA4s3SIlezlCMaGGEUIr81dnzmgKHUW/C/4HgzoxJw0MHclOVMT7B9dIN4PMoc X-Received: by 2002:a17:907:1b27:: with SMTP id mp39mr1158499ejc.519.1610541150973; Wed, 13 Jan 2021 04:32:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610541150; cv=none; d=google.com; s=arc-20160816; b=xzX52vtff10mn6jrhyiQOIqVWm05uidGLAecDipOa7XPSU821CGiGAnYFjRhpZF+Ng 1g3cGo/bfVoEcSLtXoB0CStZmxiD7oOZXAGz+wJFh+BNAEuJe64NGzlDQ5aMPdla1V9g jCqXy79qLv2tukcsuzfJRfGFqh49ZyN5dwgn5lmj29k5WET1CQcwVoyXzzXPbGxP2rmr LxbSSdXwl8tYykIkKvAVRwjtRD8+FOCTdtm/9HWkepAiXW53qy0t7q3gTuLWYK0uMayn iZgsoqdNm2BCtCkVpuLmoMGdUOwGKQ38ch8gfSZ5BrSIICyju+wrMfuZE7A1r3gZT2f5 cQVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=S+afEBTpJHcIaKonqOIAfYRNjiuDbVBuiJRbnbUlh+M=; b=uZyWGxdqJJ5IYPM3M3+bONAv/9LmIku2tJbqvlixJ16iriXSJMJFKxwCloWCJ9Ythl pwZ/UTLvnGVzRbi7b5J+Ajt9aLElFQcQyB+n2kKQ50ETH130xK9vxSsPHz2ZxRH8fqhF xgpZFJ5wigYhJSn0pcDsRbJgAh5eFUEkIrc8Vh7jF4El8ur3iyP1fBKdO32x/ZBNtGiw cP9RuhjEWToT8kAID/EoKt4DQt5F1dAqppyEbVNKemVJS1rGC+7Q9WPcovs+YMb+UihX O//35Km57Rfg9lCHQlrv94BWFc1wcyaiUfZho9y3dXAg5i2tXdgUz+w4OAS4gc1lAapN 9WNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RIeWKwdC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gs8si837700ejc.79.2021.01.13.04.32.03; Wed, 13 Jan 2021 04:32:30 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RIeWKwdC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726641AbhAMM2j (ORCPT + 99 others); Wed, 13 Jan 2021 07:28:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:56290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726184AbhAMM2j (ORCPT ); Wed, 13 Jan 2021 07:28:39 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 45BAB2313E; Wed, 13 Jan 2021 12:27:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610540878; bh=DMT/14eqvz5zf53FuIMip/3tOpUYx9AeGju+aNpk6Tg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RIeWKwdCzel81a5/+igwlQa7a96S4uuDSVMhO/TwoBeDkIRVbX+C6VT/zl3DHzGuy TN7OjM0+Zieesb8xP+RgbKU5rKX0cUd7nzCdBCw4R29wCGdqUIBnkZaVV1OJ6+Cnca DxODljnCCEJbvE8Rkq5e8BMdF1IFL/e9Km/FCSDg= Date: Wed, 13 Jan 2021 13:29:05 +0100 From: Greg KH To: Christoph Hellwig 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, 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: References: <20210106034124.30560-1-tientzu@chromium.org> <20210106034124.30560-3-tientzu@chromium.org> <20210113115126.GB29376@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210113115126.GB29376@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 13, 2021 at 12:51:26PM +0100, Christoph Hellwig wrote: > 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. I have no objections for that happening!