[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240122180013.000016d5@Huawei.com>
Date: Mon, 22 Jan 2024 18:00:13 +0000
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
CC: Russell King <rmk+kernel@...linux.org.uk>, <linux-pm@...r.kernel.org>,
<loongarch@...ts.linux.dev>, <linux-acpi@...r.kernel.org>,
<linux-arch@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <linux-riscv@...ts.infradead.org>,
<kvmarm@...ts.linux.dev>, <x86@...nel.org>,
<acpica-devel@...ts.linuxfoundation.org>, <linux-csky@...r.kernel.org>,
<linux-doc@...r.kernel.org>, <linux-ia64@...r.kernel.org>,
<linux-parisc@...r.kernel.org>, Salil Mehta <salil.mehta@...wei.com>,
Jean-Philippe Brucker <jean-philippe@...aro.org>, <jianyong.wu@....com>,
<justin.he@....com>, James Morse <james.morse@....com>
Subject: Re: [PATCH RFC v3 05/21] ACPI: Rename ACPI_HOTPLUG_CPU to include
'present'
On Mon, 18 Dec 2023 21:35:16 +0100
"Rafael J. Wysocki" <rafael@...nel.org> wrote:
> On Wed, Dec 13, 2023 at 1:49 PM Russell King <rmk+kernel@...linuxorg.uk> wrote:
> >
> > From: James Morse <james.morse@....com>
> >
> > The code behind ACPI_HOTPLUG_CPU allows a not-present CPU to become
> > present.
>
> Right.
>
> > This isn't the only use of HOTPLUG_CPU. On arm64 and riscv
> > CPUs can be taken offline as a power saving measure.
>
> But still there is the case in which a non-present CPU can become
> present, isn't it there?
Not yet defined by the architectures (and I'm assuming it probably never will be).
The original proposal we took to ARM was to do exactly that - they pushed
back hard on the basis there was no architecturally safe way to implement it.
Too much of the ARM arch has to exist from the start of time.
https://lore.kernel.org/linux-arm-kernel/cbaa6d68-6143-e010-5f3c-ec62f879ad95@arm.com/
is one of the relevant threads of the kernel side of that discussion.
Not to put specific words into the ARM architects mouths, but the
short description is that there is currently no demand for working
out how to make physical CPU hotplug possible, as such they will not
provide an architecturally compliant way to do it for virtual CPU hotplug and
another means is needed (which is why this series doesn't use the present bit
for that purpose and we have the Online capable bit in MADT/GICC)
It was a 'fun' dance of several years to get to that clarification.
As another fun fact, the same is defined for x86, but I don't think
anyone has used it yet (GICC for ARM has an online capable bit in the flags to
enable this, which was remarkably similar to the online capable bit in the
flags of the Local APIC entries as added fairly recently).
>
> > On arm64 an offline CPU may be disabled by firmware, preventing it from
> > being brought back online, but it remains present throughout.
> >
> > Adding code to prevent user-space trying to online these disabled CPUs
> > needs some additional terminology.
> >
> > Rename the Kconfig symbol CONFIG_ACPI_HOTPLUG_PRESENT_CPU to reflect
> > that it makes possible CPUs present.
>
> Honestly, I don't think that this change is necessary or even useful.
Whilst it's an attempt to avoid future confusion, the rename is
not something I really care about so my advice to Russell is drop
it unless you are attached to it!
Jonathan
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Powered by blists - more mailing lists