From: Nathan Chancellor <nathan@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org,
Maurizio Lombardi <mlombard@redhat.com>,
Mike Rapoport <rppt@linux.ibm.com>,
Konrad Rzeszutek Wilk <konrad@kernel.org>
Subject: Re: [PATCH] x86/setup: Explicitly include acpi.h
Date: Tue, 31 Aug 2021 19:24:04 -0700 [thread overview]
Message-ID: <YS7kRKmWw33rVWF6@archlinux-ax161> (raw)
In-Reply-To: <20210901021510.1561219-1-nathan@kernel.org>
On Tue, Aug 31, 2021 at 07:15:11PM -0700, Nathan Chancellor wrote:
> After commit 342f43af70db ("iscsi_ibft: fix crash due to KASLR physical
> memory remapping"), certain configurations show the following errors:
>
> arch/x86/kernel/setup.c: In function ‘setup_arch’:
> arch/x86/kernel/setup.c:916:13: error: implicit declaration of function ‘acpi_mps_check’ [-Werror=implicit-function-declaration]
> 916 | if (acpi_mps_check()) {
> | ^~~~~~~~~~~~~~
> arch/x86/kernel/setup.c:1110:9: error: implicit declaration of function ‘acpi_table_upgrade’ [-Werror=implicit-function-declaration]
> 1110 | acpi_table_upgrade();
> | ^~~~~~~~~~~~~~~~~~
> arch/x86/kernel/setup.c:1112:9: error: implicit declaration of function ‘acpi_boot_table_init’ [-Werror=implicit-function-declaration]
> 1112 | acpi_boot_table_init();
> | ^~~~~~~~~~~~~~~~~~~~
> arch/x86/kernel/setup.c:1120:9: error: implicit declaration of function ‘early_acpi_boot_init’; did you mean ‘early_cpu_init’? [-Werror=implicit-function-declaration]
> 1120 | early_acpi_boot_init();
> | ^~~~~~~~~~~~~~~~~~~~
> | early_cpu_init
> arch/x86/kernel/setup.c:1162:9: error: implicit declaration of function ‘acpi_boot_init’ [-Werror=implicit-function-declaration]
> 1162 | acpi_boot_init();
> | ^~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
>
> acpi.h was being implicitly included from iscsi_ibft.h in these
> configurations so the removal of that means these functions have no
> definition or declaration. Add acpi.h explicitly so there is no more
> error.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>
> * No fixes tag as I doubt the mentioned commit is the root cause.
>
> * The configuration was WSL2's, I did not drill down exactly which set
> of configs triggers this but it is pretty obvious what is going on
> here.
Actually, it reproduces with x86_64_defconfig so the configuration is
irrelevant. It looks like commit 12609013c43a ("x86/setup: Clean up the
header portion of setup.c") removed acpi.h, presumably because
iscsi_ibft.h included it but AFAIK, the kernel's policy has always been
to expliciltly include headers that are needed, rather than relying on
them being implicitly included.
If people care, I can resent with a fixes tag and calling out
x86_64_defconfig instead of the vague "certain configurations" but I do
not have a strong opinion personally.
> arch/x86/kernel/setup.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 63b20536c8d2..79f164141116 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -5,6 +5,7 @@
> * This file contains the setup_arch() code, which handles the architecture-dependent
> * parts of early kernel initialization.
> */
> +#include <linux/acpi.h>
> #include <linux/console.h>
> #include <linux/crash_dump.h>
> #include <linux/dma-map-ops.h>
>
> base-commit: 9e9fb7655ed585da8f468e29221f0ba194a5f613
> --
> 2.33.0
>
next prev parent reply other threads:[~2021-09-01 2:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-01 2:15 [PATCH] x86/setup: Explicitly include acpi.h Nathan Chancellor
2021-09-01 2:24 ` Nathan Chancellor [this message]
2021-09-01 7:07 ` Matthieu Baerts
2021-09-01 16:07 ` [PATCH v2] " Nathan Chancellor
2021-09-01 17:12 ` Linus Torvalds
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=YS7kRKmWw33rVWF6@archlinux-ax161 \
--to=nathan@kernel.org \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=konrad@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mlombard@redhat.com \
--cc=rppt@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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