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 CDBD6C4167B for ; Mon, 11 Dec 2023 13:22:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To: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=r1NJmamX50uEakSRaQVcetsqonLZ4uwssUlMUiL8AV4=; b=sakas8FQWVx8BL B6MoSNl/DxaNBXiD5OiPPvkzSci51YrVjTRhhQVgZwKRg62mhf69aGGzIpARB3KDcGyx8wAUk27TC TrZnbjn7D2H8c4Tgwt2tNmsl+WwL8GQQSv6Jd2NzywKxN2SsiFgB+15Y0D9a2pl9qgyEOf3CKBgpO t0TzFyRXL8gwUeFt8ROLE51PVWQHJoXREzrslvCjd0yAwSJzaxoDQlvDMoRuAiU9A8C2JXjDDrx2z JJGKVfQ2C8+xE+z0j5vsw6nGfLEramzl0fr+XoJWsNpowOxzwtx1ZMw735tpJSB7CbqQmXKjY18Hq oJQ9uFXx11xwk/keHsfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rCgE8-004wX2-2n; Mon, 11 Dec 2023 13:21:54 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rCgDX-004wNN-1O; Mon, 11 Dec 2023 13:21:25 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E72AB6127C; Mon, 11 Dec 2023 13:21:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96BCBC433C7; Mon, 11 Dec 2023 13:20:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702300862; bh=q1SgpAHgTb9yNjf1ijuF/WsU7ziWgOtp9e+gjYp9MJo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OtVmf+id/i3jL+CkVLVQSKAM+su33w9usY4qz6ohe9ikJJaAELtzij3VYjgA9Ewp8 IbjgnPDTmFzYLzisW9RoqzCM+BlinoHFZh9dn8c3DWcsxaE7n/xlIFYd5cNd5iiZYM xn+RGUNrzobVTZmgr2G/YPkzYJMxadR3JbLDRVmqIeguYU5M9B/epx6dLNTOKngCI1 MfqbPSRfjDDI0mZH6L+x+WiFuG5bmPQYYmqls0mwsWZmq8aHN3nwqrQ5zwoWRasUBO t0AaPcL5MZAHJ+qrn0787/YMKkAZKw1LM4Ra/RYRDixl9gMGsxMV+U5fiYp+UkKYuN EBTvml+3hP+1Q== Date: Mon, 11 Dec 2023 13:20:55 +0000 From: Will Deacon To: Russell King Cc: linux-pm@vger.kernel.org, loongarch@lists.linux.dev, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, kvmarm@lists.linux.dev, x86@kernel.org, linux-csky@vger.kernel.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, Salil Mehta , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com, James Morse , Catalin Marinas Subject: Re: [PATCH 12/21] arm64: setup: Switch over to GENERIC_CPU_DEVICES using arch_register_cpu() Message-ID: <20231211132054.GC25681@willie-the-truck> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231211_052103_534415_93206880 X-CRM114-Status: GOOD ( 17.81 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Nov 21, 2023 at 01:44:51PM +0000, Russell King wrote: > From: James Morse > > To allow ACPI's _STA value to hide CPUs that are present, but not > available to online right now due to VMM or firmware policy, the > register_cpu() call needs to be made by the ACPI machinery when ACPI > is in use. This allows it to hide CPUs that are unavailable from sysfs. > > Switching to GENERIC_CPU_DEVICES is an intermediate step to allow all > five ACPI architectures to be modified at once. > > Switch over to GENERIC_CPU_DEVICES, and provide an arch_register_cpu() > that populates the hotpluggable flag. arch_register_cpu() is also the > interface the ACPI machinery expects. > > The struct cpu in struct cpuinfo_arm64 is never used directly, remove > it to use the one GENERIC_CPU_DEVICES provides. > > This changes the CPUs visible in sysfs from possible to present, but > on arm64 smp_prepare_cpus() ensures these are the same. > > This patch also has the effect of moving the registration of CPUs from > subsys to driver core initialisation, prior to any initcalls running. > > Signed-off-by: James Morse > Reviewed-by: Russell King (Oracle) > Reviewed-by: Shaoqin Huang > Reviewed-by: Gavin Shan > Signed-off-by: Russell King (Oracle) > --- > Changes since RFC v2: > * Add note about initialisation order change. > --- > arch/arm64/Kconfig | 1 + > arch/arm64/include/asm/cpu.h | 1 - > arch/arm64/kernel/setup.c | 13 ++++--------- > 3 files changed, 5 insertions(+), 10 deletions(-) Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel