From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B7FF374CC; Sun, 30 Jun 2024 09:26:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719739617; cv=none; b=geAzICeLsyc53ZT08j4Q6pX2O57iUHNaoFhRfrCY1BSOxKJikVjFeUt0tjWU7Ug/C6SNFjgIK37wyUi3tQ5jvmJ7a9gKl3PqK5Wh/fA1xOTJHyrQBkHcDhR1wswSt4QCIlK0uCem/s2AGVKQkB+HFN7zMrAHCBekKZ7fH2Q3BaY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719739617; c=relaxed/simple; bh=G6kjI9e67vuphJpJZBPzCIb8jDjF9XA4lesDH05PDMg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bav5FaD2DEsOMkBBzK3j0HoaPXAChmYZrKyOFrIZCT2uTD5gWr0NKHA57S6CuivqKl+snptIFGWR9jwSvYuQ7xnBLRSst9DXzOU8iInmmExeZPIMKxkafCaLuwNd8ciJtVTHXtcc3hDdl5EssIdtiKAQBhKW/WPJpapROK0l6Ec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88924C2BD10; Sun, 30 Jun 2024 09:26:52 +0000 (UTC) Date: Sun, 30 Jun 2024 10:26:50 +0100 From: Catalin Marinas To: Gavin Shan Cc: Jonathan Cameron , Marc Zyngier , Will Deacon , 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 , Thomas Gleixner , Peter Zijlstra , loongarch@lists.linux.dev, x86@kernel.org, Russell King , "Rafael J . Wysocki" , Miguel Luis , James Morse , Salil Mehta , Jean-Philippe Brucker , Hanjun Guo , Ingo Molnar , Borislav Petkov , Dave Hansen , 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. Message-ID: References: <20240529133446.28446-1-Jonathan.Cameron@huawei.com> <20240529133446.28446-18-Jonathan.Cameron@huawei.com> <47a261e0-006d-4c64-9c9b-bc73797b8d6b@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 > > Reviewed-by: Gavin Shan > > Signed-off-by: Jonathan Cameron > > --- > > 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