linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sourabh Jain <sourabhjain@linux.ibm.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/kexec_file: fix implicit decl error
Date: Sun, 5 Feb 2023 19:20:32 +0530	[thread overview]
Message-ID: <637cfc84-e5a0-18a7-79ad-cdf474aae6ce@linux.ibm.com> (raw)
In-Reply-To: <20230204172206.7662-1-rdunlap@infradead.org>


On 04/02/23 22:52, Randy Dunlap wrote:
> 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.

I didn't realize that linux/mmzone.h includes asm/mmzone.h under 
CONFIG_NUMA.

from linux/mmzone.h

#else /* CONFIG_NUMA */

#include <asm/mmzone.h>

#endif /* !CONFIG_NUMA */

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

Yes including the asm/mmzone.h will fix the build issue.

- Sourabh

>   #include <asm/prom.h>
>   
>   struct umem_info {

  reply	other threads:[~2023-02-05 13:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04 17:22 [PATCH] powerpc/kexec_file: fix implicit decl error Randy Dunlap
2023-02-05 13:50 ` Sourabh Jain [this message]
2023-02-15 12:16 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=637cfc84-e5a0-18a7-79ad-cdf474aae6ce@linux.ibm.com \
    --to=sourabhjain@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).