Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp391539rdf; Tue, 21 Nov 2023 05:47:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3f4S6VZ7L+MRnvHNlLXmnCO6TW7r9VDW0yOYjNHap/Qci7tucsS/amdU+5R2IHFwaD1W9 X-Received: by 2002:a05:6a00:244c:b0:6c4:cf33:cbe8 with SMTP id d12-20020a056a00244c00b006c4cf33cbe8mr9340228pfj.6.1700574432439; Tue, 21 Nov 2023 05:47:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700574432; cv=none; d=google.com; s=arc-20160816; b=AOqxIaninCW3w8J0U7Esgr2w2uvfbNHgowOPIznX2V+PaPbYhhYgA71q3M7S+NxssM X21YDOvU4s3AjelgbcYvBU8cwzKj+5FfFmhugnI51bNeB9F5VtUgO5WpujU8fdB5cn09 DcWpeQyMtZnI34EfZ5rUnpUKg2uFkAc6AuQVKPxJGAY+xFXTuVWBMrpS4CKqU7pjVU0p 4asmTJJDc65Ce4ejbH8U/9XkTCvnITOOeXknpEcdJFb6gSt9lpgyHWjvgeFNLW23Niwd OBFLXe+pK/PqDayrRmOHleUEDvJca89iGB6NdoGDebIvFNiVilHl02gTg7Ws5YXebOK9 TCig== 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=+z5XQz9hkPdS0YKuNfOGCu3IbWCtcbacoD2q0D9vrOw=; fh=n/hNKOBwq2yLiZtHUXdrVYIb15Q112aXmz8Dk56reME=; b=kXd7k5zB25Ie+72gP/JEJnUWPkF5O/NZCeeGy9BnYernE07IvEG9V3X64Ztnf50u0U GNr9m9f8Tx9XUwR15wl70121O0OWTq/VnhQtJ5w4qEu2KDznnqEIR7n81iE4nMRusOPD 4yzwe/5kKfufKbTXmPSJsGkDXSxWCTRql53rmEjuoapykvxOYeOVEcaAQRnO+/wg0UdW WH0H2gGFDhm1/dECcDHqJvfHVtlPidr5+qVIjdPn+DnmQcfKvaLqUqEUgyqQTfhOzTsJ oRGjhaEN97DA/tNl4SrLrRaIRhAQggl9MFR0iuVQpyuN0F4EO8N3qkkber8JowiNPkKx wVgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=nqEI3WAY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id 36-20020a630b24000000b005be1f24c815si10084655pgl.502.2023.11.21.05.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 05:47:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=nqEI3WAY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id AFE0680C2575; Tue, 21 Nov 2023 05:46:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234379AbjKUNqf (ORCPT + 99 others); Tue, 21 Nov 2023 08:46:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234483AbjKUNqL (ORCPT ); Tue, 21 Nov 2023 08:46:11 -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 D8F0C2116; Tue, 21 Nov 2023 05:45:32 -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=+z5XQz9hkPdS0YKuNfOGCu3IbWCtcbacoD2q0D9vrOw=; b=nqEI3WAYyZJxyF64IPxHkEcmAY 0zHoBuLtkhuFbNVcphsa3DR1CeqPZB8OSJMxCewkeWa+3r2aRJsHBifLQNzcf7MdKmzS1irlVZkYc brexTxcjHljrYi9MqZlt5qPB0WZSIyTye8i3BP0Zsn2z3KX0mr0Gn5Tcy8sDo7ivRPUFHcyhdHmZI xY5m6A2RKQWhX7ADcpvQEAebkLT7S173hXa0lfCHHX101Jmg8lcPJghMpq/+37DDamUSLgZ0cIKEW orniAC8aOnbU5vGiNE6gevFXQqqcprYTUH/S//Uj72YUyJ3jSj49RkNbty3y/3+ePbiMNEMbtbVJ8 YShdbryA==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:32984 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 1r5R49-0007BM-2B; Tue, 21 Nov 2023 13:45:25 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r5R4B-00Ct0G-Kk; Tue, 21 Nov 2023 13:45:27 +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 , Huacai Chen , WANG Xuerui Subject: [PATCH 19/21] LoongArch: 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:27 +0000 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Tue, 21 Nov 2023 05:46:49 -0800 (PST) Convert loongarch to use the arch_cpu_is_hotpluggable() helper rather than arch_register_cpu(). Also remove the export as nothing should be using arch_register_cpu() outside of the core kernel/acpi code. Reviewed-by: Gavin Shan Signed-off-by: Russell King (Oracle) --- arch/loongarch/kernel/topology.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/loongarch/kernel/topology.c b/arch/loongarch/kernel/topology.c index 866c2c9ef6ab..75d5c51a7cd3 100644 --- a/arch/loongarch/kernel/topology.c +++ b/arch/loongarch/kernel/topology.c @@ -11,11 +11,8 @@ #include #ifdef CONFIG_HOTPLUG_CPU -int arch_register_cpu(int cpu) +bool arch_cpu_is_hotpluggable(int cpu) { - struct cpu *c = &per_cpu(cpu_devices, cpu); - - c->hotpluggable = !io_master(cpu); - return register_cpu(c, cpu); + return !io_master(cpu); } #endif -- 2.30.2