From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65BDEC30653 for ; Sun, 30 Jun 2024 09:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cJqqQAt1okTi4qqZIoTrnNRm46ZmbwXKfBKJZr3v33I=; b=cxkJJXolpPCDMxIFa673zv34AB BaTAz0rGi9fpDGlt4EQa3N7hZP7JvCHDDsf4wbzARngsWFbDGkKbBzTMgPMoFlg0RamLXqopDq2Ny fEDhu2FaPDJkXtXwQskbikUhshYBCjoYRkv/7WfGl6+m+XPsQSY1Su+eTXixiVSq7fljydb+NKD6u JidSkvEOXiWrt3GAfdorbW3qPR/u9WiawgyQ4WIOxactHke+c7i3RA+kLZ92O933zFNLElILLSaLo 30tqH2DJaa6odoJZf2lJdajUgeiTX7WI06hTBYMiDPsflBJf1OJRsOpuJ5LZk+4l4lw16fjmuZtUC FL6dAxew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNqq0-0000000093t-1X4h; Sun, 30 Jun 2024 09:27:12 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNqpp-0000000090D-0b1D for linux-arm-kernel@lists.infradead.org; Sun, 30 Jun 2024 09:27:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id B909ACE098A; Sun, 30 Jun 2024 09:26:57 +0000 (UTC) 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> 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240630_022701_554814_DEBC3506 X-CRM114-Status: GOOD ( 26.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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