From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 5/9] PCI: host: brcmstb: add dma-ranges for inbound traffic Date: Tue, 17 Oct 2017 10:14:22 +0200 Message-ID: <20171017081422.GA19475@lst.de> References: <1507761269-7017-1-git-send-email-jim2101024@gmail.com> <1507761269-7017-6-git-send-email-jim2101024@gmail.com> <589c04cb-061b-a453-3188-79324a02388e@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <589c04cb-061b-a453-3188-79324a02388e@arm.com> Sender: linux-kernel-owner@vger.kernel.org To: Robin Murphy Cc: Jim Quinlan , linux-kernel@vger.kernel.org, Mark Rutland , linux-mips@linux-mips.org, Florian Fainelli , devicetree@vger.kernel.org, linux-pci@vger.kernel.org, Kevin Cernekee , Will Deacon , Ralf Baechle , Rob Herring , bcm-kernel-feedback-list@broadcom.com, Gregory Fong , Catalin Marinas , Bjorn Helgaas , Brian Norris , linux-arm-kernel@lists.infradead.org, Christoph Hellwig , Marek Szyprowski , iommu@lists.linux-foundation.org List-Id: iommu@lists.linux-foundation.org Just took a quick look over this and I basically agree with the comments from Robin. What I don't understand is why you're even trying to do all these hacky things. It seems like the controller should simply set dma_pfn_offset for each device hanging off it, and all the supported architectures should be updated to obey that if they don't do so yet, and you're done without needing this giant mess.