From patchwork Tue Nov 21 13:43:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 13463103 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 859FDC61D92 for ; Tue, 21 Nov 2023 13:44:09 +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:MIME-Version: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:In-Reply-To:References: List-Owner; bh=lIvBQAnXrXKziacUUAQZ6t8fciC0AuOfKf0iDHHDCqg=; b=wM3TiyYvZsUlAQ y6VJcIhmvlwdeTXQDVTYt4zBp7UwB1VniBdR1glNx13JbyKq1sWMfujX0mOot+cczAj3N/BXHVxVc srUxNwBFp6LGzswrUe/sds/m516Z/Uu+MzZgQK+SUll0Hlhr3tZs0fz8bxB5PBBdMaSZ80WELXUr0 Th2b3+rQaziWGJo+EWzJoGuZ4Qj33gyyvgK79WfwY9TBnjyXUYlbwikxMpWXztg6gdun485djD3q9 pR3EA949ks/0VCLxmyeuVAeUpQnwLpmrCiKSRAEWtvdJlbDZQ4cPl7QjmO7WlC0AyNb/aFYRAtC6v QqgcC1ilbYcfUWnaHpig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r5R2S-00GqVw-0h; Tue, 21 Nov 2023 13:43:40 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r5R2O-00GqUH-2o; Tue, 21 Nov 2023 13:43:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=j6yzpm9IFWHjtKM8s9MyGlyx6q8sYlQWT/PUnH8khP0=; b=XPnUlMQGuuINHNrrABZGS3+EEo TTq7HU3EN0TO8e4fXkIrCqLuVpGRJFA8OTeMXrYutAUl1H8ydFwadEiZhmLiN7odCe8HG/0FjAyOS Rz7cAWXUukkyehSaM1luh5hTyALHG8y1yKqn6wfi80aCa2hkzPzr4cyFmKfQ6Pyj0jYYU0m29CG8Z zp5qNZCwFqyCd0BcxJz09kC8ogIc74q58wIVUZqulJ16+4/zsAwzqnF7B4wBYqrSrAa5BKGovcYg0 3tU5fUX9u7rQMjSrwxZgoVov7oLCwIFA0KzahQvuVPuDw5qzDIC6RRy02I6zobh2i76zm994Nt043 ytEiyjkA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:53966) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r5R2F-00075Z-33; Tue, 21 Nov 2023 13:43:27 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r5R2D-0004ER-3S; Tue, 21 Nov 2023 13:43:25 +0000 Date: Tue, 21 Nov 2023 13:43:25 +0000 From: "Russell King (Oracle)" To: 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 Cc: Albert Ou , Borislav Petkov , Catalin Marinas , Dave Hansen , Greg Kroah-Hartman , Guo Ren , "H. Peter Anvin" , Huacai Chen , Ingo Molnar , James Morse , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com, Len Brown , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , "Rafael J. Wysocki" , Salil Mehta , Sudeep Holla , Thomas Gleixner , WANG Xuerui , Will Deacon Subject: [PATCH 00/21] Initial cleanups for vCPU hotplug Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231121_054336_906123_2BFC2A8C X-CRM114-Status: GOOD ( 21.38 ) 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, Rather than posting the entire set of vCPU kernel patches, this is a subset of those patches which I hope will be able to be appropriately queued for the next merge window. I am also hoping that nothing here is covered by Rafael's concerns he alluded to in his response to the RFC v3 series. This series aims to switch most architectures over to using generic CPU devices rather than arch specific implementations, which I think is worthwhile doing even if the vCPU hotplug series needs further work. Since this series changes the init order (node_dev_init() vs cpu_dev_init()) and later on in the vCPU hotplug series move the location that CPUs are registered, the first two patches head off problems with register_cpu_capacity_sysctl() and the intel_epb code. These two were ordered later in the original series. The next pair of patches are new and remove the exports of arch_*register_cpu() which are not necessary - these functions are only called from non-modular code - drivers/base/cpu.c and acpi_processor.c both of which can only be built-in. The majority of the other patches come from the vCPU hotplug RFC v3 series I posted earlier, rebased on Linus' current tip, but with some new patches adding arch_cpu_is_hotpluggable() as the remaining arch_register_cpu() functions only differ in the setting of the hotpluggable member of the CPU device - so let's get generic code doing that and provide a way for an architecture to specify whether a CPU is hotpluggable. This patch series has been updated as best I can from the comments on its previous 22-patch posting, but there are some things that I have been unable to address (some of which go back to James' posting of RFC v2 of the vcpu hotplug series) due to lack of co-operation from either reviewers responding to my questions, or from the patch author providing information. I have now come to the conclusion that this information is never going to come, but there is still benefit to moving forward with this patch set. I don't expect that anyone will even bother to read this far down the email, so blah blah blah blah blah blah blah blah blah. I bet no one reads this so I don't know why I bother writing crud like this. Thanks! arch/arm64/Kconfig | 1 + arch/arm64/include/asm/cpu.h | 1 - arch/arm64/kernel/setup.c | 13 ++----------- arch/loongarch/Kconfig | 2 ++ arch/loongarch/kernel/topology.c | 42 ++-------------------------------------- arch/riscv/Kconfig | 1 + arch/riscv/kernel/setup.c | 18 ++--------------- arch/x86/Kconfig | 2 ++ arch/x86/include/asm/cpu.h | 4 ---- arch/x86/kernel/cpu/intel_epb.c | 2 +- arch/x86/kernel/topology.c | 33 ++----------------------------- drivers/acpi/Kconfig | 1 - drivers/acpi/acpi_processor.c | 18 ----------------- drivers/base/arch_topology.c | 38 ++++++++++++++++++++++++------------ drivers/base/cpu.c | 39 +++++++++++++++++++++++++++++-------- drivers/base/init.c | 2 +- include/linux/cpu.h | 5 +++++ 17 files changed, 78 insertions(+), 144 deletions(-)