From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 17 Oct 2017 10:14:31 +0200 (CEST) Received: from verein.lst.de ([213.95.11.211]:48624 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23990505AbdJQIOZF9eG7 (ORCPT ); Tue, 17 Oct 2017 10:14:25 +0200 Received: by newverein.lst.de (Postfix, from userid 2407) id 3DC5568D00; Tue, 17 Oct 2017 10:14:22 +0200 (CEST) Date: Tue, 17 Oct 2017 10:14:22 +0200 From: Christoph Hellwig 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 Subject: Re: [PATCH 5/9] PCI: host: brcmstb: add dma-ranges for inbound traffic 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 Content-Disposition: inline In-Reply-To: <589c04cb-061b-a453-3188-79324a02388e@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 60419 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: hch@lst.de Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips 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.