All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Gavin Shan <gshan@redhat.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Marc Zyngier <maz@kernel.org>, Will Deacon <will@kernel.org>,
	linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	Mark Rutland <mark.rutland@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	loongarch@lists.linux.dev, x86@kernel.org,
	Russell King <linux@armlinux.org.uk>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Miguel Luis <miguel.luis@oracle.com>,
	James Morse <james.morse@arm.com>,
	Salil Mehta <salil.mehta@huawei.com>,
	Jean-Philippe Brucker <jean-philippe@linaro.org>,
	Hanjun Guo <guohanjun@huawei.com>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	linuxarm@huawei.com, justin.he@arm.com, jianyong.wu@arm.com
Subject: Re: [PATCH v10 17/19] arm64: Kconfig: Enable hotplug CPU on arm64 if ACPI_PROCESSOR is enabled.
Date: Sun, 30 Jun 2024 10:26:50 +0100	[thread overview]
Message-ID: <ZoEk2mfQkIhLuh-8@arm.com> (raw)
In-Reply-To: <47a261e0-006d-4c64-9c9b-bc73797b8d6b@redhat.com>

Hi Gavin,

On Sun, Jun 30, 2024 at 10:39:04AM +1000, Gavin Shan wrote:
> On 5/29/24 11:34 PM, Jonathan Cameron wrote:
> > In order to move arch_register_cpu() to be called via the same path
> > for initially present CPUs described by ACPI and hotplugged CPUs
> > ACPI_HOTPLUG_CPU needs to be enabled.
> > 
> > The protection against invalid IDs in acpi_map_cpu() is needed as
> > at least one production BIOS is in the wild which reports entries
> > in DSDT (with no _STA method, so assumed enabled and present)
> > that don't match MADT.
> > 
> > Tested-by: Miguel Luis <miguel.luis@oracle.com>
> > Reviewed-by: Gavin Shan <gshan@redhat.com>
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > ---
> >   arch/arm64/Kconfig       |  1 +
> >   arch/arm64/kernel/acpi.c | 22 ++++++++++++++++++++++
> >   2 files changed, 23 insertions(+)
> > 
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index 5d91259ee7b5..e8f2ef2312db 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -5,6 +5,7 @@ config ARM64
> >   	select ACPI_CCA_REQUIRED if ACPI
> >   	select ACPI_GENERIC_GSI if ACPI
> >   	select ACPI_GTDT if ACPI
> > +	select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR
> 
> ACPI_HOTPLUG_CPU depends on (ACPI_PROCESSOR && HOTPLUG_CPU). It needs to be:
> 
> 	select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU
> 
> Otherwise, we can have compiling error with the following configurations.
> 
> CONFIG_ACPI_PROCESSOR=y
> CONFIG_HOTPLUG_CPU=n
> CONFIG_ACPI_HOTPLUG_CPU=y
> 
> arch/arm64/kernel/smp.c: In function ‘arch_unregister_cpu’:
> arch/arm64/kernel/smp.c:563:9: error: implicit declaration of function ‘unregister_cpu’; did you mean ‘register_cpu’? [-Werror=implicit-function-declaration]
>   563 |         unregister_cpu(c);
>       |         ^~~~~~~~~~~~~~
>       |         register_cpu

Ah, I thought that in addition to the warning for unmet dependencies,
kbuild would also leave the option off. I need to add SUSPEND=n and
HIBERNATE=n to my build scripts.

The fix matches what x86 does, so I'm ok with it.

> Since the series has been queued to Catalin's "for-next/vcpu-hotplug" branch, I
> guess the easiest way would be to fix it in place with Catalin's help.

I wasn't planning to rebase the branch unless there's something major.
Since the doesn't happen with defconfig, it's doesn't affect bisection
that much, so my preference would be for a fix on top of this branch
(and with a Fixes: tag since the branch is stable).

Thanks.

-- 
Catalin

  reply	other threads:[~2024-06-30  9:26 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29 13:34 [PATCH v10 00/19] ACPI/arm64: add support for virtual cpu hotplug Jonathan Cameron
2024-05-29 13:34 ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 01/19] ACPI: processor: Simplify initial onlining to use same path for cold and hotplug Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 02/19] cpu: Do not warn on arch_register_cpu() returning -EPROBE_DEFER Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 03/19] ACPI: processor: Drop duplicated check on _STA (enabled + present) Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 04/19] ACPI: processor: Return an error if acpi_processor_get_info() fails in processor_add() Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 05/19] ACPI: processor: Fix memory leaks in error paths of processor_add() Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 06/19] ACPI: processor: Move checks and availability of acpi_processor earlier Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 07/19] ACPI: processor: Add acpi_get_processor_handle() helper Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 08/19] ACPI: processor: Register deferred CPUs from acpi_processor_get_info() Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 09/19] ACPI: scan: switch to flags for acpi_scan_check_and_detach() Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 10/19] ACPI: Add post_eject to struct acpi_scan_handler for cpu hotplug Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 11/19] arm64: acpi: Move get_cpu_for_acpi_id() to a header Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 12/19] arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 13/19] irqchip/gic-v3: Don't return errors from gic_acpi_match_gicc() Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-06-19  8:11   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 14/19] irqchip/gic-v3: Add support for ACPI's disabled but 'online capable' CPUs Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-06-19 12:10   ` Marc Zyngier
2024-05-29 13:34 ` [PATCH v10 15/19] arm64: psci: Ignore DENIED CPUs Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 16/19] arm64: arch_register_cpu() variant to check if an ACPI handle is now available Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 17/19] arm64: Kconfig: Enable hotplug CPU on arm64 if ACPI_PROCESSOR is enabled Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-06-30  0:39   ` Gavin Shan
2024-06-30  9:26     ` Catalin Marinas [this message]
2024-07-01  0:17       ` Gavin Shan
2024-05-29 13:34 ` [PATCH v10 18/19] arm64: document virtual CPU hotplug's expectations Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-06-30 12:53   ` Huacai Chen
2024-07-10  8:23     ` Jonathan Cameron
2024-05-29 13:34 ` [PATCH v10 19/19] cpumask: Add enabled cpumask for present CPUs that can be brought online Jonathan Cameron
2024-05-29 13:34   ` Jonathan Cameron
2024-06-13 10:25 ` [PATCH v10 00/19] ACPI/arm64: add support for virtual cpu hotplug Jonathan Cameron
2024-06-19 12:11   ` Marc Zyngier
2024-06-28 14:49     ` Jonathan Cameron
2024-06-28 17:56 ` Catalin Marinas

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=ZoEk2mfQkIhLuh-8@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=gshan@redhat.com \
    --cc=guohanjun@huawei.com \
    --cc=james.morse@arm.com \
    --cc=jean-philippe@linaro.org \
    --cc=jianyong.wu@arm.com \
    --cc=justin.he@arm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxarm@huawei.com \
    --cc=loongarch@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=miguel.luis@oracle.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.