Skip to contentSkip to conversation

kexec: include asm/early_ioremap.h

PATCH Superseded Arnd Bergmann 3 participants 3 messages Apr 23, 2025 – Apr 24, 2025

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kexec: include asm/early_ioremap.h

From: Arnd Bergmann <[email protected]>

The early_memremap() function is decleared in a header that is only indirectly included here:

kernel/kexec_handover.c:1116:8: error: call to undeclared function 'early_memremap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1116 | fdt = early_memremap(fdt_phys, fdt_len);
| ^

Fixes 4bfe738ce89a ("kexec: add KHO support to kexec file loads")
---
 kernel/kexec_handover.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/kexec_handover.c +3 -0
index 4bbc6f5ef723..3e8a0118e182 100644
@@ -18,6 +18,9 @@
 #include <linux/memblock.h>
 #include <linux/notifier.h>
 #include <linux/page-isolation.h>
+
+#include <asm/early_ioremap.h>
+
 /*
  * KHO is tightly coupled with mm init and needs access to some of mm
  * internal APIs.
Signature · 1 line
2.39.5
#1 lore raw
Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The early_memremap() function is decleared in a header that is only indirectly included here:

kernel/kexec_handover.c:1116:8: error: call to undeclared function 'early_memremap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1116 | fdt = early_memremap(fdt_phys, fdt_len);
| ^

Fixes 4bfe738ce89a ("kexec: add KHO support to kexec file loads")

Hi Arnd,

I didn't try to reproduce this problem. And perhaps this isn't particularly important. But, naively, I would have expected the following as it is the commit the introduces calls to early_memremap() in exec_handover.c.

Fixes b0a311dba688 ("kexec: add KHO parsing support")
#2 lore raw
Quoted 10 lines · Simon Horman
Quoted 9 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The early_memremap() function is decleared in a header that is only indirectly included here:

kernel/kexec_handover.c:1116:8: error: call to undeclared function 'early_memremap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1116 | fdt = early_memremap(fdt_phys, fdt_len);
| ^

Quoted 8 lines
Quoted 2 lines
Fixes 4bfe738ce89a ("kexec: add KHO support to kexec file loads")

I didn't try to reproduce this problem. And perhaps this isn't particularly important. But, naively, I would have expected the following as it is the commit the introduces calls to early_memremap() in exec_handover.c.

Fixes b0a311dba688 ("kexec: add KHO parsing support")

Yes, you are correct. I've sent a v2 now. Ideally Andrew can just fold the fixup into the "kexec: add KHO parsing support" patch, in which case my incorrect changelog text disappears.

Arnd