From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH v3 04/32] asm-generic: add ioremap_nopost() remap interface Date: Wed, 19 Apr 2017 08:43:36 +1000 Message-ID: <1492555416.25766.97.camel@kernel.crashing.org> References: <20170411122923.6285-1-lorenzo.pieralisi@arm.com> <20170411122923.6285-5-lorenzo.pieralisi@arm.com> <1491917983.7236.9.camel@kernel.crashing.org> <20170412112022.GY17774@n2100.armlinux.org.uk> <20170418154937.GA1006@red-moon> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170418154937.GA1006@red-moon> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Lorenzo Pieralisi , Russell King - ARM Linux Cc: Jonas Bonn , Rich Felker , linux-pci@vger.kernel.org, Will Deacon , David Howells , Max Filippov , Paul Mackerras , Huacai Chen , Guan Xuetao , Thomas Gleixner , Hans-Christian Egtvedt , linux-arch@vger.kernel.org, Jesper Nilsson , Yoshinori Sato , Michael Ellerman , Helge Deller , "James E.J. Bottomley" , Ingo Molnar , Geert Uytterhoeven , Catalin Marinas , Matt Turner , Haavard Skinnemoen , Fenghua Yu , James Hogan List-Id: linux-arch.vger.kernel.org On Tue, 2017-04-18 at 16:49 +0100, Lorenzo Pieralisi wrote: > I can do that yes, which already means I have to know if eg microblaze > (drivers/pci/host/pcie-xilinx.c) can provide a mapping with nonposted > writes semantics, otherwise it is a dead-end. > > Another option would be going back to what v1 did, namely, to implement > a pci_remap_cfgspace() interface (it is the _nopost() suffix that stirred > debate - nobody would object to having a default pci_remap_cfgspace() > implementation that defaults to ioremap_nocache(), I know Bjorn does not > like it to be PCI specific, just adding an option on the table to make > progress). Well, it boils down again to the fact that a mapping attribute isn't sufficient. Let's say I'm microblaze and I can't do non-posted mapping. Then the Host Bridge driver needs to *know* that so it can implement a different workaround, such as reading back from some bridge register after every config write which ensures the previous write reached its destination for example, or whatever other IP specific mechanism. Cheers, Ben.