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 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 4FE47CD342F for ; Tue, 19 Sep 2023 01:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gdBmmhCHjh92duv1gRlvi6+cI7eC4mBN8CMVrceN274=; b=ZiHKigPkhQTBfd erxyqyldhU8k52kYGKXPQovD5ZIDOpIYkiFmBxqFKXPO562RN3DtuTuDrctwrGKaMSiPY1AlKCZjU of2yEKwEB9CMykaiZrY1fMeMZDGbeVybFf+dhEdUX0AvxJYPsFYY+QHDMOOWTz3L2SDpTWDeHezG6 INHgB8s1f4FyXpGOckaz+oYhMc2zK5vjxf8NVqWzacqf+dAaAObX4cwIgS70Ww8L8NaRmzZq1ZYK8 aY/lD1MtWNnRpYWfnGa0+4p3zSfFbX2+TkEH0eOiieyhlIeXwztmMVfWDJ6VFVwyZaB5nsXC5Xg2E buVDGBMjfSQ1i7PLgx0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiPFK-00GdHc-21; Tue, 19 Sep 2023 01:09:46 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiPFH-00GdGp-0z for linux-arm-kernel@lists.infradead.org; Tue, 19 Sep 2023 01:09:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695085782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5xhYDTylANariynyECyDawRfZxSRk3P2GMXADURjfrY=; b=c3O1BwE3HprJ7o3rPsTOo5FgelnEJZJuDX5tcPpBe2dsP9zR1IhY4NRdGvcsuWahhNH8Dh KmzcfbwUx+i0X4Oi4Tw4j8Y7D+PERR1B93qPGSM8YSZBsRgfnqEBI4uCDFy51OT5Zxa6iU e0Rg7mVAkFiKi9oKn5x5r2XghTmGZcc= Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-247-iBv6b9cfNUevXeHIf3vjeA-1; Mon, 18 Sep 2023 21:09:39 -0400 X-MC-Unique: iBv6b9cfNUevXeHIf3vjeA-1 Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-690c1423627so399344b3a.1 for ; Mon, 18 Sep 2023 18:09:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695085778; x=1695690578; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5xhYDTylANariynyECyDawRfZxSRk3P2GMXADURjfrY=; b=KRHdPmkbz5pp/vY80AhnFkCT/3BcbloX6kJhN06W5lHuzqkUTOkvMAxqneZ6Lypo0G Uz1ckimd4D/myAw4/pkepA+lkQCVqPaksyz4Ib0fLtjWA8HLJ2wfrzERNetzpwYIBCqU sQr8CSm29xmtRzb81Gv+3loALKkp8WKD6gH51rgt5JDxeTJ9SeNVyL1MNX3KtpJ7hFjX PHBRk/ksQvTVkrWmTOk/p6dwc/JUUasNhWkLpA+vWMRZMUs6eb1g7Rhq6/zSpYEx+6S3 J4bJcDOQaSQM15yv4FwuyalayrEraLmKFdqSHpIH/xTjUeGKG3XUKfUX8u1m26ECkxqB R/LA== X-Gm-Message-State: AOJu0Yw54T30a/100EcLX8bAtZ75OINfZQLLKMroVAq9e3yJ4VnOBP8N oPu7pqmVN+Wg/Fq/4e+qivxM5TFWyxFmslumU8+KIDwB+9lTRaucz0kS2WcZl5iXvjDLjb3kNno kdTU9Fe84sWN+XPj3VStEmfUJAu2cLq71PeU= X-Received: by 2002:a05:6a20:7faa:b0:140:324c:124c with SMTP id d42-20020a056a207faa00b00140324c124cmr10255882pzj.62.1695085778234; Mon, 18 Sep 2023 18:09:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdG9bCpdvmZ3ZQXnGhuch/qDkbh0mPQBnni4kkBKZ4ohjirIgnh97Jnx/y/Pt40AJLReKTog== X-Received: by 2002:a05:6a20:7faa:b0:140:324c:124c with SMTP id d42-20020a056a207faa00b00140324c124cmr10255863pzj.62.1695085777865; Mon, 18 Sep 2023 18:09:37 -0700 (PDT) Received: from ?IPV6:2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5? ([2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5]) by smtp.gmail.com with ESMTPSA id bh3-20020a170902a98300b001c55d591f07sm3082096plb.260.2023.09.18.18.09.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Sep 2023 18:09:37 -0700 (PDT) Message-ID: <23ed10ee-b88f-8681-35a4-cefc2e3a7800@redhat.com> Date: Tue, 19 Sep 2023 11:09:30 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [RFC PATCH v2 25/35] LoongArch: Use the __weak version of arch_unregister_cpu() To: James Morse , 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 Cc: x86@kernel.org, Salil Mehta , Russell King , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com References: <20230913163823.7880-1-james.morse@arm.com> <20230913163823.7880-26-james.morse@arm.com> From: Gavin Shan In-Reply-To: <20230913163823.7880-26-james.morse@arm.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_180943_411593_1F73AEC7 X-CRM114-Status: GOOD ( 16.85 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/14/23 02:38, James Morse wrote: > 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 > --- > arch/loongarch/kernel/topology.c | 9 --------- > 1 file changed, 9 deletions(-) > I think arch/x86/kernel/topology.c::arch_unregister_cpu() can be dropped either. Reviewed-by: Gavin Shan > diff --git a/arch/loongarch/kernel/topology.c b/arch/loongarch/kernel/topology.c > index 8e4441c1ff39..5a75e2cc0848 100644 > --- a/arch/loongarch/kernel/topology.c > +++ b/arch/loongarch/kernel/topology.c > @@ -16,13 +16,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 Thanks, Gavin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel