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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FC9EC4167B for ; Tue, 28 Nov 2023 15:18:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346748AbjK1PSZ (ORCPT ); Tue, 28 Nov 2023 10:18:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346741AbjK1PSY (ORCPT ); Tue, 28 Nov 2023 10:18:24 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCA2710D4; Tue, 28 Nov 2023 07:18:30 -0800 (PST) Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4SfmLD0Yx2z6D8YZ; Tue, 28 Nov 2023 23:18:12 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 171B2140D30; Tue, 28 Nov 2023 23:18:29 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 28 Nov 2023 15:18:28 +0000 Date: Tue, 28 Nov 2023 15:18:27 +0000 From: Jonathan Cameron To: "Russell King (Oracle)" CC: , , , , , , , , , , , , , Salil Mehta , Jean-Philippe Brucker , , , James Morse , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: Re: [PATCH RFC 17/22] x86/topology: convert to use arch_cpu_is_hotpluggable() Message-ID: <20231128151827.0000689e@Huawei.com> In-Reply-To: References: Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500005.china.huawei.com (7.191.163.240) To lhrpeml500005.china.huawei.com (7.191.163.240) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 07 Nov 2023 10:30:45 +0000 "Russell King (Oracle)" wrote: > Convert x86 to use the arch_cpu_is_hotpluggable() helper rather than > arch_register_cpu(). > > Signed-off-by: Russell King (Oracle) Reviewed-by: Jonathan Cameron As with earlier set of related changes, could squash this down to avoid churn and use Co-developed or similar. Up to you though. Maybe a forwards reference to this being a later change in the patch 15 description might be good though! > --- > 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 */