From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] dma-mapping: move dma configuration to bus infrastructure Date: Wed, 14 Mar 2018 10:02:21 +0100 Message-ID: <20180314090221.GE28983@lst.de> References: <1520868292-2479-1-git-send-email-nipun.gupta@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Robin Murphy Cc: rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org, jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, msuchanek-l3A5Bk7waGM@public.gmane.org, hch-jcswGhMUV9g@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: iommu@lists.linux-foundation.org >> + .dev_groups = amba_dev_groups, >> + .match = amba_match, >> + .uevent = amba_uevent, >> + .pm = &amba_pm, >> + .dma_configure = amba_dma_configure, >> + .dma_deconfigure = amba_dma_deconfigure, >> + .force_dma = true, > > This patch should also be removing force_dma because it no longer makes > sense. If DMA configuration is now done by a bus-level callback, then a bus > which wants its children to get DMA configuration needs to implement that > callback; there's nowhere to force a "default" global behaviour any more. Btw, we don't really know how many busses currently rely on OF or ACPI configuration. So maybe we need to keep those as a default? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:34721 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751089AbeCNJCX (ORCPT ); Wed, 14 Mar 2018 05:02:23 -0400 Date: Wed, 14 Mar 2018 10:02:21 +0100 From: Christoph Hellwig To: Robin Murphy Cc: Nipun Gupta , hch@lst.de, linux@armlinux.org.uk, gregkh@linuxfoundation.org, m.szyprowski@samsung.com, bhelgaas@google.com, dmitry.torokhov@gmail.com, rafael.j.wysocki@intel.com, jarkko.sakkinen@linux.intel.com, linus.walleij@linaro.org, johan@kernel.org, msuchanek@suse.de, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org Subject: Re: [PATCH] dma-mapping: move dma configuration to bus infrastructure Message-ID: <20180314090221.GE28983@lst.de> References: <1520868292-2479-1-git-send-email-nipun.gupta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-pci-owner@vger.kernel.org List-ID: >> + .dev_groups = amba_dev_groups, >> + .match = amba_match, >> + .uevent = amba_uevent, >> + .pm = &amba_pm, >> + .dma_configure = amba_dma_configure, >> + .dma_deconfigure = amba_dma_deconfigure, >> + .force_dma = true, > > This patch should also be removing force_dma because it no longer makes > sense. If DMA configuration is now done by a bus-level callback, then a bus > which wants its children to get DMA configuration needs to implement that > callback; there's nowhere to force a "default" global behaviour any more. Btw, we don't really know how many busses currently rely on OF or ACPI configuration. So maybe we need to keep those as a default?