[PATCH v7 06/18] kexec: include asm/early_ioremap.h

Changyuan Lyu posted 18 patches 9 months, 1 week ago
There is a newer version of this series
[PATCH v7 06/18] kexec: include asm/early_ioremap.h
Posted by Changyuan Lyu 9 months, 1 week ago
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);
      |               ^

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Changyuan Lyu <changyuanl@google.com>
---
 kernel/kexec_handover.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/kexec_handover.c b/kernel/kexec_handover.c
index a1e1cd0330143..59f3cf9557f50 100644
--- a/kernel/kexec_handover.c
+++ b/kernel/kexec_handover.c
@@ -17,6 +17,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.49.0.906.g1f30a19c02-goog
Re: [PATCH v7 06/18] kexec: include asm/early_ioremap.h
Posted by Andrew Morton 9 months, 1 week ago
On Thu,  1 May 2025 15:54:13 -0700 Changyuan Lyu <changyuanl@google.com> 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);
>       |               ^
> 
> ...
>
> --- a/kernel/kexec_handover.c
> +++ b/kernel/kexec_handover.c
> @@ -17,6 +17,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.

When resending, it's best to fold little fixes like this into the base
patch, along with a little note and the author's signed-off-by.

I shall queue this as a fix to be folded into "kexec: add KHO parsing
support", thanks.
Re: [PATCH v7 06/18] kexec: include asm/early_ioremap.h
Posted by Changyuan Lyu 9 months, 1 week ago
On Thu, May 1, 2025 at 5:36 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Thu,  1 May 2025 15:54:13 -0700 Changyuan Lyu <changyuanl@google.com> 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);
> >       |               ^
> >
> > ...
> >
> > --- a/kernel/kexec_handover.c
> > +++ b/kernel/kexec_handover.c
> > @@ -17,6 +17,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.
>
> When resending, it's best to fold little fixes like this into the base
> patch, along with a little note and the author's signed-off-by.

Thanks for the suggestion Andrew! I will follow it next time.

> I shall queue this as a fix to be folded into "kexec: add KHO parsing
> support", thanks.


Best,
Changyuan