From patchwork Tue Jul 2 06:59:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13719033 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 1EE18C30658 for ; Tue, 2 Jul 2024 06:56:00 +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:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=k1oxLG2SHZXjnsYPUB/4e5+R0CmZu4MYHphaCkdQPPE=; b=3Grf6g/fxs18a9XDalKBht5Ei4 xgFjsg0hfYO1aUiFHmSxHMxHAXAfqoH1xItfI4LMFf0Bzmto8N6EWEfKdy/IMzVukAlAJfww36zXP OIf9yp6FFC71mnSGb9Mma5/FgO/rPD9iHEecM6L5MDpWGW31fzHJKzdMSVCEiJGZNWg8z+emqwSXS jgMmHNeQD1XOLi6p+jrO1+1Zf2I2zysI+UZKyWpMbsq47DU59rMC0yBJFCl5HaEPjTzSPTle5kec0 6e64pL1tyFXEiClY7McI9aReOujrrh1vxnhhAET7gxygAiBXZIA/EmHyXAEjEtcXfFFBfWNzK8l4Q 4b57bmKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOXQb-00000005mk3-01IB; Tue, 02 Jul 2024 06:55:49 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOXQP-00000005mh2-2uCi for linux-arm-kernel@lists.infradead.org; Tue, 02 Jul 2024 06:55:39 +0000 Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4WCtvn4vFXznYS3; Tue, 2 Jul 2024 14:55:17 +0800 (CST) Received: from kwepemi100008.china.huawei.com (unknown [7.221.188.57]) by mail.maildlp.com (Postfix) with ESMTPS id BFF1914022D; Tue, 2 Jul 2024 14:55:32 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemi100008.china.huawei.com (7.221.188.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 2 Jul 2024 14:55:32 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , CC: Subject: [PATCH 2/2] ARM: 9322/1: Convert to arch_cpu_is_hotpluggable() Date: Tue, 2 Jul 2024 14:59:06 +0800 Message-ID: <20240702065906.929987-3-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240702065906.929987-1-ruanjinjie@huawei.com> References: <20240702065906.929987-1-ruanjinjie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi100008.china.huawei.com (7.221.188.57) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_235537_917557_6596C990 X-CRM114-Status: UNSURE ( 9.23 ) X-CRM114-Notice: Please train this message. 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 Convert arm32 to use the arch_cpu_is_hotpluggable() helper rather than arch_register_cpu(). Signed-off-by: Jinjie Ruan --- arch/arm/kernel/setup.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index f91e2b5b8b20..e6a857bf0ce6 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -1201,12 +1201,9 @@ void __init setup_arch(char **cmdline_p) mdesc->init_early(); } -int arch_register_cpu(int num) +bool arch_cpu_is_hotpluggable(int num) { - struct cpu *cpu = &per_cpu(cpu_devices, num); - - cpu->hotpluggable = platform_can_hotplug_cpu(num); - return register_cpu(cpu, num); + return platform_can_hotplug_cpu(num); } #ifdef CONFIG_HAVE_PROC_CPU