From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [RFC PATCH 1/2] asm-generic: io: Add exec versions of ioremap Date: Wed, 26 Nov 2014 22:32:47 +0100 Message-ID: <2060921.TrTof4X6qj@wuerfel> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Dave Gerlach Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arch@vger.kernel.org, devicetree@vger.kernel.org, Russ Dill , Greg Kroah-Hartman , Philipp Zabel , Shawn Guo , Tony Lindgren , Anson.Huang@freescale.com, Russ Dill List-Id: linux-arch.vger.kernel.org On Wednesday 26 November 2014 15:14:00 Dave Gerlach wrote: > @@ -66,6 +66,11 @@ extern void ioport_unmap(void __iomem *); > #define ioremap_wc ioremap_nocache > #endif > > +#ifndef ARCH_HAS_IOREMAP_EXEC > +#define ioremap_exec ioremap > +#define ioremap_exec_nocache ioremap_nocache > +#endif > + > #ifdef CONFIG_PCI > /* Destroy a virtual mapping cookie for a PCI BAR (memory or IO) */ > struct pci_dev; > ioremap and ioremap_nocache are the same, and there is no architecture-independent interface to map an MMIO range as cached because a lot of architectures can't do that. Also, I think there are architectures that cannot execute from uncached memory, so I think adding this as a generic API is not a good idea. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de ([212.227.126.131]:53696 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752567AbaKZVdA (ORCPT ); Wed, 26 Nov 2014 16:33:00 -0500 From: Arnd Bergmann Subject: Re: [RFC PATCH 1/2] asm-generic: io: Add exec versions of ioremap Date: Wed, 26 Nov 2014 22:32:47 +0100 Message-ID: <2060921.TrTof4X6qj@wuerfel> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-arch-owner@vger.kernel.org List-ID: To: Dave Gerlach Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arch@vger.kernel.org, devicetree@vger.kernel.org, Russ Dill , Greg Kroah-Hartman , Philipp Zabel , Shawn Guo , Tony Lindgren , Anson.Huang@freescale.com, Russ Dill Message-ID: <20141126213247.CzGBpXeeBkfEzBZGiPCBUBcQvS5OIPyiLeYJLLJy8Kg@z> On Wednesday 26 November 2014 15:14:00 Dave Gerlach wrote: > @@ -66,6 +66,11 @@ extern void ioport_unmap(void __iomem *); > #define ioremap_wc ioremap_nocache > #endif > > +#ifndef ARCH_HAS_IOREMAP_EXEC > +#define ioremap_exec ioremap > +#define ioremap_exec_nocache ioremap_nocache > +#endif > + > #ifdef CONFIG_PCI > /* Destroy a virtual mapping cookie for a PCI BAR (memory or IO) */ > struct pci_dev; > ioremap and ioremap_nocache are the same, and there is no architecture-independent interface to map an MMIO range as cached because a lot of architectures can't do that. Also, I think there are architectures that cannot execute from uncached memory, so I think adding this as a generic API is not a good idea. Arnd