Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp369518rdb; Mon, 18 Sep 2023 19:10:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHacHX/6Z7eqYi1S6zfcXeHCR1fiYXI4Op4/Z812uIA5JJqGVxQAlQppZQlXgZcwsGXVV4F X-Received: by 2002:a05:6358:52c5:b0:13a:a85b:ce00 with SMTP id z5-20020a05635852c500b0013aa85bce00mr12505821rwz.31.1695089410596; Mon, 18 Sep 2023 19:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695089410; cv=none; d=google.com; s=arc-20160816; b=ShLrjN5ZT4JwBMjH3xVUucEajJnYu6a+2Bcq62AMc2cJtSpwfHAqgdFIDIyybd8hXR Jc5x6/5qdjNQSPMXPq9SvM6kV3stWcAjc96K4NSAS0nPQW5YRuUpiqvWUHIEGx6RybGa 2FE+wj3kZGgsXKOMHJjKiT2eMkA+yNcsU0xW5ScThcSgsaKD34Um7Ca/k8ojd/HpGavM saE/IFq+h2nffpWUTmB70WUW2ndp8ZZrIjd2D85aivLQP0yIxQyG1co89RYLDejTVWYf 9+Eqp+1xYTVfBAn8II+AZtlRfwv0ENTVf3PdpQLZukZuhQkm9Tpb2KPJQi0VkUFnulRQ cC+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=5xhYDTylANariynyECyDawRfZxSRk3P2GMXADURjfrY=; fh=PXJ1nrAkwnzNPHtj0xILXFW28d5sEdNuBWEBRL0T4wA=; b=onUZ/f+wUZ6/ZJshvDBVnTRyhjt1F+Dlq4OP3Zm2FPlMqBKDxMu7RlbaS/uS7VyhbG jbaDIEcIxf8VSu2h2YyZ3fo50iqHBk93iyCu6Y4hfnI2/hskM4GJvWVSirHdFXAZv97C sohCak3W6ctSDT0U0JmGSO5BwcOxriqEHlPx95k0NuMSZGK5y0DWM7eEIpONEOM6+CYs /NolxhTsIQLDxaRizrhJEeSBebdGlMyyKqNv4o/+m71wZuWRHPJHgDWMTTv/uMu/EmCj UNoJCWxwcp1Aoa9cAc0K5ZlsI7pBg/vnZP7bq1ueageycyyGZtXx2tLsFojDrC93PTAV OiMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g5gvk9Cb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id q5-20020a63e945000000b005740286f2b8si8575232pgj.297.2023.09.18.19.10.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 19:10:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g5gvk9Cb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A5A8B8253FE8; Mon, 18 Sep 2023 18:15:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229708AbjISBKt (ORCPT + 99 others); Mon, 18 Sep 2023 21:10:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjISBKm (ORCPT ); Mon, 18 Sep 2023 21:10:42 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B8498E for ; Mon, 18 Sep 2023 18:09:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695085780; 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=g5gvk9Cbldzwgf1whkpv1bhkeCidpWMGTQkiHzikYV0NVbdBS1aIs/VRwtCX6tEFH/wuRz iTN6ISnycsk01kDlCaUiLKxQFNmOzupCQcDAjbHQgG/yE0nQkLF2hUGNYJMh9rLl9Fp2Yq XHRv1G6U4v1beJPrgRuM+xpXGkSDI/k= 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-425-o6tRmt3zP3qo7D5SR0rLmw-1; Mon, 18 Sep 2023 21:09:39 -0400 X-MC-Unique: o6tRmt3zP3qo7D5SR0rLmw-1 Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-690c1423627so399342b3a.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=YeBtoU36LHRuYo2ZfoLvUmmSiypbaQuht4jhYgrG3ojXI0iHMLWeZKqE7IwskCZ9PD d8Wn6MAvWmAEHHzqvHHBnbuvX58zTh1ehA8yauAmIx8Uy5KAksEc/RNIjfPTdAy27/hy 1X6WDTKNRdyJQK/Bqp+9CbtBVV8ZJX77U9FwIJ7jJ+RFgFGrnB8a26t0Mjjw/VRLn9NV 3KXvNCrJbMV6i1+iO3X/r02ar6dOyTK4teLMFiWBW0eK1Wcc82L7h5TsvuBrJwaVPKya 9OYZ5KioZI5Q6V1vPpkCxer3zjViOL8uJBwmA6Hll+xzckhh+Hi0UYHstSO9tbu9DQYY Ljiw== X-Gm-Message-State: AOJu0YyQ4eqT4+CWfbeQkdFlDT1oEwGIkcV7Upz486b3nr6LYriKC9mG afht3TPi9TD/xJwx0OCcAAr5HmX//Sv+47OfAA6Y/5jI33/OrzmPUsFQf2GYNdYwGKGe/yH9gKu bg0o6yTLquORoU99Zqu0j8qxJ X-Received: by 2002:a05:6a20:7faa:b0:140:324c:124c with SMTP id d42-20020a056a207faa00b00140324c124cmr10255878pzj.62.1695085778231; Mon, 18 Sep 2023 18:09:38 -0700 (PDT) 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() Content-Language: en-US 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> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 18 Sep 2023 18:15:04 -0700 (PDT) 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