From: Borislav Petkov <bp@alien8.de>
To: Chao Fan <fanc.fnst@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
mingo@redhat.com, hpa@zytor.com, x86@kernel.org
Subject: Re: [PATCH] x86/boot: Move detecting acpi=off in cmdline to get_rsdp_addr()
Date: Fri, 15 Feb 2019 10:28:41 +0100 [thread overview]
Message-ID: <20190215092841.GA10433@zn.tnic> (raw)
In-Reply-To: <20190215091047.23047-1-fanc.fnst@cn.fujitsu.com>
On Fri, Feb 15, 2019 at 05:10:47PM +0800, Chao Fan wrote:
> If "acpi=off" specified in cmdline, the whole functions of acpi.c
> should not work, there is no need to ealy parse RSDP, so detect
> "acpi=off" in the very first place.
>
> Also replace magic number with macro.
>
> Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>
> ---
> arch/x86/boot/compressed/acpi.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/boot/compressed/acpi.c b/arch/x86/boot/compressed/acpi.c
> index 0ef4ad55b29b..5510a2105b7b 100644
> --- a/arch/x86/boot/compressed/acpi.c
> +++ b/arch/x86/boot/compressed/acpi.c
> @@ -213,8 +213,13 @@ static acpi_physical_address bios_get_rsdp_addr(void)
> /* Return RSDP address on success, otherwise 0. */
> acpi_physical_address get_rsdp_addr(void)
> {
> + char arg[MAX_ACPI_ARG_LENGTH];
> acpi_physical_address pa;
>
> + if (cmdline_find_option("acpi", arg, sizeof(arg)) == 3 &&
> + !strncmp(arg, "off", 3))
> + return 0;
This place looks wrong because we have a get_acpi_rsdp() call before
that which overrides acpi=off practically.
Also, if you move it to get_rsdp_addr(), add a static variable recording
the previous result of the cmdline parsing because I don't want it
parsing cmdline each time it is called.
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
next prev parent reply other threads:[~2019-02-15 9:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-15 9:10 Chao Fan
2019-02-15 9:28 ` Borislav Petkov [this message]
2019-02-15 9:46 ` Chao Fan
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=20190215092841.GA10433@zn.tnic \
--to=bp@alien8.de \
--cc=fanc.fnst@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.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
Powered by JetHome