linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/kexec_file: fix implicit decl error
@ 2023-02-04 17:22 Randy Dunlap
  2023-02-05 13:50 ` Sourabh Jain
  2023-02-15 12:16 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2023-02-04 17:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: Randy Dunlap, linuxppc-dev, Sourabh Jain

kexec (PPC64) code calls memory_hotplug_max(). Add the header declaration
for it from <asm/mmzone.h>. Using <linux/mmzone.h> does not work since
the #include for <asm/mmzone.h> depends on CONFIG_NUMA=y, which is not
set in this kernel config file.

Fixes this build error/warning:

../arch/powerpc/kexec/file_load_64.c: In function 'kexec_extra_fdt_size_ppc64':
../arch/powerpc/kexec/file_load_64.c:993:33: error: implicit declaration of function 'memory_hotplug_max' [-Werror=implicit-function-declaration]
  993 |                 usm_entries = ((memory_hotplug_max() / drmem_lmb_size()) +
      |                                 ^~~~~~~~~~~~~~~~~~

Fixes: fc546faa5595 ("powerpc/kexec_file: Count hot-pluggable memory in FDT estimate")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Sourabh Jain <sourabhjain@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/kexec/file_load_64.c |    1 +
 1 file changed, 1 insertion(+)

diff -- a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c
--- a/arch/powerpc/kexec/file_load_64.c
+++ b/arch/powerpc/kexec/file_load_64.c
@@ -26,6 +26,7 @@
 #include <asm/firmware.h>
 #include <asm/kexec_ranges.h>
 #include <asm/crashdump-ppc64.h>
+#include <asm/mmzone.h>
 #include <asm/prom.h>
 
 struct umem_info {

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

end of thread, other threads:[~2023-02-15 12:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-04 17:22 [PATCH] powerpc/kexec_file: fix implicit decl error Randy Dunlap
2023-02-05 13:50 ` Sourabh Jain
2023-02-15 12:16 ` Michael Ellerman

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