Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp644186pxu; Tue, 5 Jan 2021 23:52:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyV+EI29X5KbwV3ytnWdczodisNjqSDtIlQF3KEhC41t4iHuol8NhkhfcMq4KV7aNMvaDq8 X-Received: by 2002:a05:6402:139a:: with SMTP id b26mr3132226edv.47.1609919564921; Tue, 05 Jan 2021 23:52:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609919564; cv=none; d=google.com; s=arc-20160816; b=KhD2kl+uSGUNg2J+k+Rwmi8OJIqb1uUaRjYUn/7gkQU7iuuvzzpO9Yk9oRaGPnqSex hieRPH7UBqFwN9wOduSxj0TYZ+EUT3Finj5fl4ZSIZdO8lUxyYN/T+/BHZkni+KhAO/3 tlZKnJCkMWlnM9O+LU2ZaHrFMbgiVqcQJKyu6opMgZ//WS1uA9N3y0Fp97hpIGIptxdB hqiXxRvkzqZViEFH+WcU63FZoTiXQjaF7i7tgPSLiHye5NcFhtoZTqONmc8hWsA8hO1I qelJMqyFByAz/bBBZBZLkmBCGdQM6n2Iw4DLYjG2mI5rQ7YF/2lBtddLJxRTG8saX98X fCIw== 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=qSWs5ZIruSdKr6df01vzVoxrER/I1DBDRcbxHY/WHLA=; b=G+bUTnjGDxw3IJdpd0FP/29RqZG8gkDLdGiE4AoItQsTHiOm7evy4pv8eMjmTNJIR1 qY/VGmsD91BpcWxYEIosBNOskd9RjK5YjwbZ5jaRSNvPe+BiyUMZlcoVlwO93HzSS6jo jRPqJPbu8qxb19kHf5xzW09P3+q94O1Dbh+/UOlzKVjUypLxRw09ch/Jw4Hc4QqoZbtp yQ/I40KLk8+VC4Gxbr5EmRKnZYJ/epV/z4DMIECvjqTrwImUVGs0dbwIzRbBJg2h/ekZ paH2B6p3uY6MFRUQEcGVkrqXq5MIp/QKBhYFRXIJTZmCdhgBpcrE2cXKvHhPrTKN51bj p2ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=STtQBirT; 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 m3si652387ejn.166.2021.01.05.23.52.21; Tue, 05 Jan 2021 23:52:44 -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=STtQBirT; 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 S1726020AbhAFHus (ORCPT + 99 others); Wed, 6 Jan 2021 02:50:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:33948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725788AbhAFHus (ORCPT ); Wed, 6 Jan 2021 02:50:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7129D2070C; Wed, 6 Jan 2021 07:50:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609919407; bh=Piu5gusr/UGLicaCqANy6GNdwM1M9LXLgq30KLvh2D4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=STtQBirTvMJHJfy3BDpBJr1nF4y3j9P09tA52QukFa2+zVDJOvZxlpH0YuQb1dKaI tkZ/1YHajtxpOZBb2tYYK9x5sW39V1FMN5v9MY2fd4frFWPosjKHysaj5P3pqOj5H4 cLt1ndn2T4gOT+l7NViKlEBYi94u2sh/OTHke2vk= Date: Wed, 6 Jan 2021 08:50:03 +0100 From: Greg KH To: Claire Chang Cc: 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: 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: <20210106034124.30560-3-tientzu@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 06, 2021 at 11:41:20AM +0800, Claire Chang wrote: > Add the initialization function to create restricted DMA pools from > matching reserved-memory nodes in the device tree. > > Signed-off-by: Claire Chang > --- > include/linux/device.h | 4 ++ > include/linux/swiotlb.h | 7 +- > kernel/dma/Kconfig | 1 + > kernel/dma/swiotlb.c | 144 ++++++++++++++++++++++++++++++++++------ > 4 files changed, 131 insertions(+), 25 deletions(-) > > diff --git a/include/linux/device.h b/include/linux/device.h > index 89bb8b84173e..ca6f71ec8871 100644 > --- 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? thanks, greg k-h