From: Borislav Petkov <bp@alien8.de>
To: Kairui Song <kasong@redhat.com>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
dyoung@redhat.com, bhe@redhat.com, kexec@lists.infradead.org,
akpm@linux-foundation.org, robert.moore@intel.com,
erik.schmauss@intel.com, rafael.j.wysocki@intel.com,
lenb@kernel.org, fanc.fnst@cn.fujitsu.com,
linux-acpi@vger.kernel.org
Subject: Re: [PATCH v3 2/3] acpi: store acpi_rsdp address for later kexec usage
Date: Fri, 18 Jan 2019 12:26:28 +0100 [thread overview]
Message-ID: <20190118112628.GC622@zn.tnic> (raw)
In-Reply-To: <20190118111310.29589-3-kasong@redhat.com>
On Fri, Jan 18, 2019 at 07:13:09PM +0800, Kairui Song wrote:
> Currently we have acpi_os_get_root_pointer as the universal function
> to get RSDP address. But the function itself and some functions it
> depends on are in .init section and make it not easy to retrieve the
> RSDP value once kernel is initialized.
>
> And for kexec, it need to retrive RSDP again if EFI is disabled, because
> the second kernel will not be able get the RSDP value in such case, so
> it expects either the user specify the RSDP value using kernel cmdline,
> or kexec could retrive and pass the RSDP value using boot_params.
>
> This patch stores the RSDP address when initialized is done, and
> introduce an acpi_os_get_root_pointer_late for later kexec usage.
>
> Signed-off-by: Kairui Song <kasong@redhat.com>
> ---
> drivers/acpi/osl.c | 10 ++++++++++
> include/linux/acpi.h | 3 +++
> 2 files changed, 13 insertions(+)
>
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index f29e427d0d1d..6340d34d0df1 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -187,6 +187,16 @@ static int __init setup_acpi_rsdp(char *arg)
> return kstrtoul(arg, 16, &acpi_rsdp);
> }
> early_param("acpi_rsdp", setup_acpi_rsdp);
> +
> +acpi_physical_address acpi_os_get_root_pointer_late(void) {
> + return acpi_rsdp;
> +}
> +
> +static int __init acpi_store_root_pointer(void) {
> + acpi_rsdp = acpi_os_get_root_pointer();
> + return 0;
> +}
No, this is getting completely nuts: there's a bunch of functions which
all end up returning boot_params's field except pvh_get_root_pointer().
And now you're adding a late variant. And the cmdline paramater
acpi_rsdp is in a CONFIG_KEXEC wrapper, and and...
Wait until Chao Fan's stuff is applied, then do your changes ontop
an drop all that ifdeffery. We will make this RDSP thing enabled
unconditionally so that there's no need for ifdeffery and function
wrappers.
Also, after Chao's stuff, you won't need to call
acpi_os_get_root_pointer() because the early code would've done that.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
next prev parent reply other threads:[~2019-01-18 11:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 11:13 [PATCH v3 0/3] make kexec work with efi=noruntime or efi=old_map Kairui Song
2019-01-18 11:13 ` [PATCH v3 1/3] x86, kexec_file_load: Don't setup EFI info if EFI runtime is not enabled Kairui Song
2019-01-25 2:53 ` Dave Young
2019-01-18 11:13 ` [PATCH v3 2/3] acpi: store acpi_rsdp address for later kexec usage Kairui Song
2019-01-18 11:26 ` Borislav Petkov [this message]
2019-01-18 11:43 ` Kairui Song
2019-01-18 11:13 ` [PATCH v3 3/3] x86, kexec_file_load: make it work with efi=noruntime or efi=old_map Kairui Song
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=20190118112628.GC622@zn.tnic \
--to=bp@alien8.de \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=dyoung@redhat.com \
--cc=erik.schmauss@intel.com \
--cc=fanc.fnst@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=kasong@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rafael.j.wysocki@intel.com \
--cc=robert.moore@intel.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;
as well as URLs for NNTP newsgroup(s).