powerpc/kexec_file: fix implicit decl error
authorRandy Dunlap <rdunlap@infradead.org>
Sat, 4 Feb 2023 17:22:06 +0000 (09:22 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 6 Feb 2023 11:00:30 +0000 (22:00 +1100)
commit97e45d469eb180a7bd2809e4e079331552c73e42
tree557509ce9b04e0b3293ab803a3d389fe248d59b8
parente33416fca8a2313b8650bd5807aaf34354d39a4c
powerpc/kexec_file: fix implicit decl error

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 always set.

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'
  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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230204172206.7662-1-rdunlap@infradead.org
arch/powerpc/kexec/file_load_64.c