Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1964123rda; Tue, 24 Oct 2023 08:22:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEsfurVBmm8K8cBO2dypYNaArn8faRRfgAzGG883r+8Q6ZytpuPov9gvCVlwZxUi98V6aW7 X-Received: by 2002:a05:6a20:7348:b0:163:5bfd:ae5b with SMTP id v8-20020a056a20734800b001635bfdae5bmr3045591pzc.15.1698160976343; Tue, 24 Oct 2023 08:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698160976; cv=none; d=google.com; s=arc-20160816; b=PQ8mbLMx4xF2GD9UXUFyrEl9hogzKo+/Y3v7PKE5qNl4nxjOmXE7mPcXfbVO6L4n92 JdPyt1vyzgXyorNZZ3eBk2o01dVo4y/1CWAKVukjisKVlG0d+tpkuBoV+MDtnofpfpI8 9EQdUcsC3M9Bttq2qbEkZwwYHTrvz6vECyGvd6LU3Cfjvl2uNDRECIcFOBI1nHyWvwVa wq4MGppNQU/kuMl3aCH66DlHwe8XREcGs8pwiktykjWWo7ZJySbWx4kWq3A7yW+Uo81Z CyKLXb0QCVL8MYhGUd5ol17Tq6fKpuxVgpqMlyPmSO4fzjeP2JUW7McfsCb+XTZxY/HX QGKQ== 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=OJBhmyu/vU7K1KRJlvc2+ydilRGhWCEq5NT0Tp7+EuE=; fh=n/hNKOBwq2yLiZtHUXdrVYIb15Q112aXmz8Dk56reME=; b=oml7TlXYEYF6GUknEDc31YwyKFJNliFbjvmQyhl62mTwIeqUnIsdWvLtU+vB3VRW58 mwnudzpWov1r+LdNbV8xkqCV+AD6XoxuOzWf3w+3v9AUKp3u30gWEx/vRyGwRa9xe9BJ rWqDAWD4cmwFl/iaAKFGXSCr9yOiDtdZ11NgiVbF0VUeKQxkhCMXeTgyiXrLoVgCkixo mOyOLCtDtQE7EXkNQ6QFOiTHThEcruL+6mQkBP1f2YJFLWcEF2XtkTTWpS9Qs4Yz7qGH JnXxcqCTzi6dwlh/48Gai+wtPDuuK8bvIbXx2sFeJ9x7Dj5tuNnunxSLa6+zf3l4xn++ /+SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="iG1/WzYf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id u21-20020a656715000000b00565f2d55050si8852619pgf.737.2023.10.24.08.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 08:22:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="iG1/WzYf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 4141080A73EA; Tue, 24 Oct 2023 08:22:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234778AbjJXPWq (ORCPT + 99 others); Tue, 24 Oct 2023 11:22:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234900AbjJXPVc (ORCPT ); Tue, 24 Oct 2023 11:21:32 -0400 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 76B861FDC; Tue, 24 Oct 2023 08:18:44 -0700 (PDT) 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=OJBhmyu/vU7K1KRJlvc2+ydilRGhWCEq5NT0Tp7+EuE=; b=iG1/WzYfoNKMjG2yRgqZ7a5B0t WY8q8c75UjwIZGLwimqMAq+a5yTVtFo/3pMzO+5/QGwrpwXMxCov9HkQ7Dn1xzchPFUFPSzJImOvY DwcMTnTgwJ0oSlPsItxxXEpaLM88bE1KJtLbUXsD+yhx9bjRTTSJSjIdQD9BjWYWTn5Y2oTZPOUU2 qJuUrhkO/SLTo/YujC5eGYjr4v+HOW00S+A21rFPqgc/w/RF2BqHzD7Gcm58inz/AwZgGKsjT4p10 6jybcpzSBfl4agcBvOuVM5jZrOfrhlUS7+RyIeP+amro9BXC+vhzHxrJ0TC39ACMtD5qSZOF60yB0 DuAqUghg==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:47588 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 1qvJAz-0004Uh-0A; Tue, 24 Oct 2023 16:18:37 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qvJB0-00AqRe-H9; Tue, 24 Oct 2023 16:18:38 +0100 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 29/39] LoongArch: Use the __weak version of arch_unregister_cpu() 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, 24 Oct 2023 16:18:38 +0100 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Tue, 24 Oct 2023 08:22:53 -0700 (PDT) From: James Morse LoongArch provides its own arch_unregister_cpu(). This clears the hotpluggable flag, then unregisters the CPU. It isn't necessary to clear the hotpluggable flag when unregistering a cpu. unregister_cpu() writes NULL to the percpu cpu_sys_devices pointer, meaning cpu_is_hotpluggable() will return false, as get_cpu_device() has returned NULL. Remove arch_unregister_cpu() and use the __weak version. Signed-off-by: James Morse Reviewed-by: Jonathan Cameron Reviewed-by: Gavin Shan Signed-off-by: Russell King (Oracle) --- arch/loongarch/kernel/topology.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/arch/loongarch/kernel/topology.c b/arch/loongarch/kernel/topology.c index bf58351beac1..b595edbfdbcd 100644 --- a/arch/loongarch/kernel/topology.c +++ b/arch/loongarch/kernel/topology.c @@ -19,13 +19,4 @@ int arch_register_cpu(int cpu) return register_cpu(c, cpu); } EXPORT_SYMBOL(arch_register_cpu); - -void arch_unregister_cpu(int cpu) -{ - struct cpu *c = &per_cpu(cpu_devices, cpu); - - c->hotpluggable = 0; - unregister_cpu(c); -} -EXPORT_SYMBOL(arch_unregister_cpu); #endif -- 2.30.2