kexec.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kexec: include asm/early_ioremap.h
@ 2025-04-23 16:29 Arnd Bergmann
  2025-04-24  9:23 ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2025-04-23 16:29 UTC (permalink / raw)
  To: Alexander Graf, Mike Rapoport, Changyuan Lyu, Andrew Morton,
	Baoquan He
  Cc: Arnd Bergmann, kexec, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/kexec_handover.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/kexec_handover.c b/kernel/kexec_handover.c
index 4bbc6f5ef723..3e8a0118e182 100644
--- a/kernel/kexec_handover.c
+++ b/kernel/kexec_handover.c
@@ -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.
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kexec: include asm/early_ioremap.h
  2025-04-23 16:29 [PATCH] kexec: include asm/early_ioremap.h Arnd Bergmann
@ 2025-04-24  9:23 ` Simon Horman
  2025-04-24  9:33   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2025-04-24  9:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Alexander Graf, Mike Rapoport, Changyuan Lyu, Andrew Morton,
	Baoquan He, Arnd Bergmann, kexec, linux-kernel

On Wed, Apr 23, 2025 at 06:29:18PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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")


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kexec: include asm/early_ioremap.h
  2025-04-24  9:23 ` Simon Horman
@ 2025-04-24  9:33   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2025-04-24  9:33 UTC (permalink / raw)
  To: Simon Horman, Arnd Bergmann
  Cc: Alexander Graf, Mike Rapoport, Changyuan Lyu, Andrew Morton,
	Baoquan He, kexec, linux-kernel

On Thu, Apr 24, 2025, at 11:23, Simon Horman wrote:
> On Wed, Apr 23, 2025 at 06:29:18PM +0200, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> 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")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-24 11:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-23 16:29 [PATCH] kexec: include asm/early_ioremap.h Arnd Bergmann
2025-04-24  9:23 ` Simon Horman
2025-04-24  9:33   ` Arnd Bergmann

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).