* [PATCH v2 1/2] ia64: split off early_ioremap() declarations into asm/early_ioremap.h
@ 2016-01-12 13:22 Ard Biesheuvel
[not found] ` <1452604966-9905-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Ard Biesheuvel @ 2016-01-12 13:22 UTC (permalink / raw)
To: tony.luck-ral2JQCrhuEAvxtiuMwx3w,
linux-efi-u79uwXL29TY76Z2rM5mHXA, linux-0h96xk9xTtrk1uMJSBkQmQ,
linux-ia64-u79uwXL29TY76Z2rM5mHXA,
matt-mF/unelCI9GS6iBeEJttW/XRex20P6io,
fenghua.yu-ral2JQCrhuEAvxtiuMwx3w
Cc: will.deacon-5wv7dgnIgG8, Ard Biesheuvel
Unlike x86, arm64 and ARM, ia64 does not declare its implementations
of early_ioremap/early_iounmap/early_memremap/early_memunmap in a header
file called <asm/early_ioremap.h>
This complicates the use of these functions in generic code, since the
header cannot be included directly, and we have to rely on transitive
includes, which is fragile.
So create a <asm/early_ioremap.h> for ia64, and move the existing
definitions into it.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
arch/ia64/include/asm/early_ioremap.h | 10 ++++++++++
arch/ia64/include/asm/io.h | 5 +----
2 files changed, 11 insertions(+), 4 deletions(-)
create mode 100644 arch/ia64/include/asm/early_ioremap.h
diff --git a/arch/ia64/include/asm/early_ioremap.h b/arch/ia64/include/asm/early_ioremap.h
new file mode 100644
index 000000000000..eec9e1d1b833
--- /dev/null
+++ b/arch/ia64/include/asm/early_ioremap.h
@@ -0,0 +1,10 @@
+#ifndef _ASM_IA64_EARLY_IOREMAP_H
+#define _ASM_IA64_EARLY_IOREMAP_H
+
+extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size);
+#define early_memremap(phys_addr, size) early_ioremap(phys_addr, size)
+
+extern void early_iounmap (volatile void __iomem *addr, unsigned long size);
+#define early_memunmap(addr, size) early_iounmap(addr, size)
+
+#endif
diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h
index 9041bbe2b7b4..a865d2a04f75 100644
--- a/arch/ia64/include/asm/io.h
+++ b/arch/ia64/include/asm/io.h
@@ -20,6 +20,7 @@
*/
#include <asm/unaligned.h>
+#include <asm/early_ioremap.h>
/* We don't use IO slowdowns on the ia64, but.. */
#define __SLOW_DOWN_IO do { } while (0)
@@ -427,10 +428,6 @@ __writeq (unsigned long val, volatile void __iomem *addr)
extern void __iomem * ioremap(unsigned long offset, unsigned long size);
extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
extern void iounmap (volatile void __iomem *addr);
-extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size);
-#define early_memremap(phys_addr, size) early_ioremap(phys_addr, size)
-extern void early_iounmap (volatile void __iomem *addr, unsigned long size);
-#define early_memunmap(addr, size) early_iounmap(addr, size)
static inline void __iomem * ioremap_cache (unsigned long phys_addr, unsigned long size)
{
return ioremap(phys_addr, size);
--
2.5.0
^ permalink raw reply related [flat|nested] 6+ messages in thread[parent not found: <1452604966-9905-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* [PATCH v2 2/2] efi: include asm/early_ioremap.h not asm/efi.h to get early_memremap [not found] ` <1452604966-9905-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2016-01-12 13:22 ` Ard Biesheuvel 2016-01-12 21:33 ` [PATCH v2 1/2] ia64: split off early_ioremap() declarations into asm/early_ioremap.h Luck, Tony 1 sibling, 0 replies; 6+ messages in thread From: Ard Biesheuvel @ 2016-01-12 13:22 UTC (permalink / raw) To: tony.luck-ral2JQCrhuEAvxtiuMwx3w, linux-efi-u79uwXL29TY76Z2rM5mHXA, linux-0h96xk9xTtrk1uMJSBkQmQ, linux-ia64-u79uwXL29TY76Z2rM5mHXA, matt-mF/unelCI9GS6iBeEJttW/XRex20P6io, fenghua.yu-ral2JQCrhuEAvxtiuMwx3w Cc: will.deacon-5wv7dgnIgG8, Ard Biesheuvel The code in efi.c uses early_memremap(), but relies on a transitive include rather than including asm/early_ioremap.h directly, since this header did not exist on ia64. Commit f7d924894265 ("arm64/efi: refactor EFI init and runtime code for reuse by 32-bit ARM") attempted to work around this by including asm/efi.h, which transitively includes asm/early_ioremap.h on most architectures. However, since asm/efi.h does not exist on ia64 either, this is not much of an improvement. Now that we have created an asm/early_ioremap.h for ia64, we can just include it directly. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- drivers/firmware/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index cffa89b3317b..2cd37dad67a6 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -25,7 +25,7 @@ #include <linux/io.h> #include <linux/platform_device.h> -#include <asm/efi.h> +#include <asm/early_ioremap.h> struct efi __read_mostly efi = { .mps = EFI_INVALID_TABLE_ADDR, -- 2.5.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH v2 1/2] ia64: split off early_ioremap() declarations into asm/early_ioremap.h [not found] ` <1452604966-9905-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2016-01-12 13:22 ` [PATCH v2 2/2] efi: include asm/early_ioremap.h not asm/efi.h to get early_memremap Ard Biesheuvel @ 2016-01-12 21:33 ` Luck, Tony 2016-01-13 10:34 ` Will Deacon 1 sibling, 1 reply; 6+ messages in thread From: Luck, Tony @ 2016-01-12 21:33 UTC (permalink / raw) To: Ard Biesheuvel, linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org, linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org, Yu, Fenghua Cc: will.deacon-5wv7dgnIgG8@public.gmane.org > So create a <asm/early_ioremap.h> for ia64, and move the existing > definitions into it. These look OK. Acked-by: Tony Luck <toy.luck@intel.com> Can you put them into the same tree where the pending breakage is sitting? Then I don't have to worry about coordinating pull requests from the ia64 tree. -Tony ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] ia64: split off early_ioremap() declarations into asm/early_ioremap.h 2016-01-12 21:33 ` [PATCH v2 1/2] ia64: split off early_ioremap() declarations into asm/early_ioremap.h Luck, Tony @ 2016-01-13 10:34 ` Will Deacon 2016-01-13 21:36 ` Luck, Tony 0 siblings, 1 reply; 6+ messages in thread From: Will Deacon @ 2016-01-13 10:34 UTC (permalink / raw) To: Luck, Tony Cc: Ard Biesheuvel, linux-efi@vger.kernel.org, linux@roeck-us.net, linux-ia64@vger.kernel.org, matt@codeblueprint.co.uk, Yu, Fenghua On Tue, Jan 12, 2016 at 09:33:46PM +0000, Luck, Tony wrote: > > So create a <asm/early_ioremap.h> for ia64, and move the existing > > definitions into it. > > These look OK. > > Acked-by: Tony Luck <toy.luck@intel.com> s/toy/tony/ ;) > Can you put them into the same tree where the pending breakage is sitting? > Then I don't have to worry about coordinating pull requests from the ia64 > tree. The arm trees have already been pulled, so the breakage is in mainline. I think it makes the most sense to fix this either via the ia64 or the efi tree, but I'll queue something at -rc1 if it's still not resolved by then. Will ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v2 1/2] ia64: split off early_ioremap() declarations into asm/early_ioremap.h 2016-01-13 10:34 ` Will Deacon @ 2016-01-13 21:36 ` Luck, Tony 2016-01-14 7:19 ` Ard Biesheuvel 0 siblings, 1 reply; 6+ messages in thread From: Luck, Tony @ 2016-01-13 21:36 UTC (permalink / raw) To: Will Deacon Cc: Ard Biesheuvel, linux-efi@vger.kernel.org, linux@roeck-us.net, linux-ia64@vger.kernel.org, matt@codeblueprint.co.uk, Yu, Fenghua > The arm trees have already been pulled, so the breakage is in mainline. > > I think it makes the most sense to fix this either via the ia64 or the > efi tree, but I'll queue something at -rc1 if it's still not resolved by > then. I put the two patches in the ia64 tree and sent a pull request to Linus. -Tony ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] ia64: split off early_ioremap() declarations into asm/early_ioremap.h 2016-01-13 21:36 ` Luck, Tony @ 2016-01-14 7:19 ` Ard Biesheuvel 0 siblings, 0 replies; 6+ messages in thread From: Ard Biesheuvel @ 2016-01-14 7:19 UTC (permalink / raw) To: Luck, Tony Cc: Will Deacon, linux-efi@vger.kernel.org, linux@roeck-us.net, linux-ia64@vger.kernel.org, matt@codeblueprint.co.uk, Yu, Fenghua On 13 January 2016 at 22:36, Luck, Tony <tony.luck@intel.com> wrote: >> The arm trees have already been pulled, so the breakage is in mainline. >> >> I think it makes the most sense to fix this either via the ia64 or the >> efi tree, but I'll queue something at -rc1 if it's still not resolved by >> then. > > I put the two patches in the ia64 tree and sent a pull request to Linus. > Thanks Tony ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-01-14 7:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-12 13:22 [PATCH v2 1/2] ia64: split off early_ioremap() declarations into asm/early_ioremap.h Ard Biesheuvel
[not found] ` <1452604966-9905-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-01-12 13:22 ` [PATCH v2 2/2] efi: include asm/early_ioremap.h not asm/efi.h to get early_memremap Ard Biesheuvel
2016-01-12 21:33 ` [PATCH v2 1/2] ia64: split off early_ioremap() declarations into asm/early_ioremap.h Luck, Tony
2016-01-13 10:34 ` Will Deacon
2016-01-13 21:36 ` Luck, Tony
2016-01-14 7:19 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).