[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231027115813.imxsyq2ehl664nnw@box.shutemov.name>
Date: Fri, 27 Oct 2023 14:58:13 +0300
From: "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>
To: "Huang, Kai" <kai.huang@...el.com>
Cc: "tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"x86@...nel.org" <x86@...nel.org>, "bp@...en8.de" <bp@...en8.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
"Reshetova, Elena" <elena.reshetova@...el.com>,
"Nakajima, Jun" <jun.nakajima@...el.com>,
"rafael@...nel.org" <rafael@...nel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"sathyanarayanan.kuppuswamy@...ux.intel.com"
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
"Hunter, Adrian" <adrian.hunter@...el.com>,
"thomas.lendacky@....com" <thomas.lendacky@....com>,
"ashish.kalra@....com" <ashish.kalra@....com>,
"kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
"Christopherson,, Sean" <seanjc@...gle.com>,
"bhe@...hat.com" <bhe@...hat.com>,
"linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>
Subject: Re: [PATCHv2 13/13] x86/acpi: Add support for CPU offlining for ACPI
MADT wakeup method
On Tue, Oct 24, 2023 at 10:11:58AM +0000, Huang, Kai wrote:
>
> > --- /dev/null
> > +++ b/arch/x86/kernel/acpi/madt.S
>
> I think the name 'madt.S' is too generic. How about something be more specific
> such as madt_reset.S, or madt_playdead.S, etc?
Okay, madt_playdead.S sounds good.
> > @@ -11,6 +16,150 @@ static u64 acpi_mp_wake_mailbox_paddr;
> > /* Virtual address of the Multiprocessor Wakeup Structure mailbox */
> > static struct acpi_madt_multiproc_wakeup_mailbox *acpi_mp_wake_mailbox;
> >
> > +u64 acpi_mp_pgd;
> > +u64 acpi_mp_reset_vector_paddr;
> > +
> > +void asm_acpi_mp_play_dead(void);
> > +
> > +static void __init *alloc_pgt_page(void *context)
> > +{
> > + return memblock_alloc(PAGE_SIZE, PAGE_SIZE);
> > +}
> > +
> > +/*
> > + * Make sure asm_acpi_mp_play_dead() is present in the identity mapping at
> > + * the same place as in the kernel page tables. The function switches to
> > + * the identity mappingĀ
> >
>
> This function itself doesn't switch to the identity mapping. It just creates
> the kernel mapping for asm_acpi_mp_play_dead() in the identify mapping page
> table.
By "The function" I meant asm_acpi_mp_play_dead(). Yeah, it is not clear.
Will so s/The function/asm_acpi_mp_play_dead()/
> > - cpu_hotplug_disable_offlining();
> > + if (mp_wake->version >= ACPI_MADT_MP_WAKEUP_VERSION_V1 &&
> > + mp_wake->header.length >= ACPI_MADT_MP_WAKEUP_SIZE_V1) {
> > + acpi_mp_setup_reset(mp_wake->reset_vector);
>
> It's better to fallback to "disable offline" if this function fails.
>
Okay, will warn to disable offlining.
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists