Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp392029rdf; Tue, 21 Nov 2023 05:48:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGrzHMCbxR7n98u1Cyp6XN+d5+ngvVkZoyGvWH0M9wOHrJIhJnstZr3Ew2HK49DusBUpgWm X-Received: by 2002:a17:902:ead1:b0:1ce:654a:8210 with SMTP id p17-20020a170902ead100b001ce654a8210mr11472748pld.47.1700574481299; Tue, 21 Nov 2023 05:48:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700574481; cv=none; d=google.com; s=arc-20160816; b=Fj20KRSmnLqbaGJPfK1hNT5ss5zagifyYe8my1aG1EJOTxI52CAML6syqkF1z2d8f4 QvYU+bqyoDx9h1qFKKMncexDjuIZNgRFqX858u7IBo14vYcSX2hFxSlh10vOY2nVsU3b cYlhbpByphK0gjeTPrewduUlQaHZ5tVwFEFftyd4lbULRGktLcUuFEx/f7ZxhmzW4tRH 2O5xRlWZH6aQqVsAFoSgvWi2wPhuUyr3Nw4cNloIxou+6ZbElf13PvBh9NSX3tA8aNqo IrjjFKhTMpaatOCWeczwougsz0QTFTyEV0xYiHpdDzGRrHl+cwhaeMktyRWNrRWvtMqe mSAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:sender:message-id:content-transfer-encoding :content-disposition:mime-version:subject:cc:to:from:references :in-reply-to:dkim-signature; bh=gaUuxoRP2iSef3HGwjZTXVv7sp9dUHlrSN6JEtACmSA=; fh=pBRrH9R0jn/tw414lsKbebjvUFyOrcd69gD7eKz3EjE=; b=uUhtKPeXoDenZQc/IqOy850At93fgRNVtVAfcRWyYXw1WDvPNRhtWc/ZyMCR9yDNaL G2wnuWmye7Hg6sLKIV6oLkGTmFi550EV8yaAVuJ6W1YPix6Y/hOFUQe/zV3XfSeK8GSt oyIZKNNJnm6EIu1Pwru3419e9SNzq5wcX4zbu3k9YeyuUtmowFNNwwSzCNw7aljbTUh2 Y3eO5HkV9u2875q0+EhkEIcGRxuo9W4OFEmKhrkHQg/UM62w48foNsgah0NR9S316ejn S0SxKfo7vyMf5mvFP/BNaJnxbIHw8HkmmIWCs7k286bPZL8ntN4gBDEnaGse7pzJ9n/A w+TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=MG0g9GvH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a6-20020a170902ecc600b001cf677df8c0si3003313plh.432.2023.11.21.05.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 05:48:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=MG0g9GvH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B1DD4812A97D; Tue, 21 Nov 2023 05:46:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234304AbjKUNqO (ORCPT + 99 others); Tue, 21 Nov 2023 08:46:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234488AbjKUNpv (ORCPT ); Tue, 21 Nov 2023 08:45:51 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1ABF1FD4; Tue, 21 Nov 2023 05:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gaUuxoRP2iSef3HGwjZTXVv7sp9dUHlrSN6JEtACmSA=; b=MG0g9GvHPLNzYgIMRjPbdF3Zjd MWnJjqRCsvPoH2okKjYX6iX5oYgvzh3unPGb8gsRm+/0j2HuiWbN6KE8oLw8a3H8OBvWDIK4b5xb9 pcwSRY5fwtLgbO0/b+4UsGX5H+lmgyNpOkleh7Dln/pOGLyFrOXauYKhTJHi0n39uEvWNKXJlgL6B 0+9jSY0gyVtms+qjjQL3QEscua+BVqfwHHHbHN1UZn2eGo1LBUJmJQaLwVp7JWkncmAqRmf2/VQSR UUmskRxCB1+woeIzyUCnH+nIHcRzvF0H+A7OqbPFL8fvBG+8ufHTL/uPDPApx6U5O1Hl6GIAmg4EO XYJxioMQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:52668 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r5R3u-0007AY-0r; Tue, 21 Nov 2023 13:45:10 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r5R3w-00Cszy-6k; Tue, 21 Nov 2023 13:45:12 +0000 In-Reply-To: References: 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: Salil Mehta , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com, James Morse , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH 16/21] x86/topology: convert to use arch_cpu_is_hotpluggable() MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Tue, 21 Nov 2023 13:45:12 +0000 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 05:46:31 -0800 (PST) Convert x86 to use the arch_cpu_is_hotpluggable() helper rather than arch_register_cpu(). Reviewed-by: Gavin Shan Signed-off-by: Russell King (Oracle) --- arch/x86/kernel/topology.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c index 211863cb5b81..d42c28b8bfd8 100644 --- a/arch/x86/kernel/topology.c +++ b/arch/x86/kernel/topology.c @@ -36,11 +36,8 @@ #include #ifdef CONFIG_HOTPLUG_CPU -int arch_register_cpu(int cpu) +bool arch_cpu_is_hotpluggable(int cpu) { - struct cpu *c = per_cpu_ptr(&cpu_devices, cpu); - - c->hotpluggable = cpu > 0; - return register_cpu(c, cpu); + return cpu > 0; } #endif /* CONFIG_HOTPLUG_CPU */ -- 2.30.2