Message ID | 20230913163823.7880-5-james.morse@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp73886vqi; Wed, 13 Sep 2023 19:58:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSO4gRVaufUaAB4s9yr2rDzy+ZxoZRqBDJLye3qe/0JTU/n0lWtlQbxZIRthAVILaF0rU+ X-Received: by 2002:a17:90a:df8a:b0:26b:698f:dda7 with SMTP id p10-20020a17090adf8a00b0026b698fdda7mr4127298pjv.32.1694660312055; Wed, 13 Sep 2023 19:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694660312; cv=none; d=google.com; s=arc-20160816; b=aDN7d4yVCv8fYgogC6mkq2KFtX8piNjL6FTBZN+Te2V+iMjm8mIzHrqXfe7jS/5ESw PG2AQGWvTVimjWW3BQ/U4yCmiEU3CvPRrmzUYg0qGSHGr+PwKl6HC/StwdCjky451ajg mbRAqEi2u+OIjI72+feKJ2shzY/YEVbzMHE4FrZoiKhdmsuaX/ZVx7+x7buAo0dPQ/R2 R9exRz0V2nFm+E9k/7/3urUu6P/qEcIaMsReSd9Kn9Rod1qLEiF7I/W7Q2RC6fsVsGJq FoVSvX+RfVoM2pV4iltE60v/UyceLgfx7fFky/aAe2hhFdJRfmVRZHxPQzToPc6x2Pce nBJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=izyCxWPP5MIzPKSLH8pfshm9d5tChtDCeBhcYhIaLRg=; fh=2nhVWB0fZ+8YH0lLFpnF/Mo8eq+n1VMLe+b+IpvS0g0=; b=GA/WlCCGgQqhCoYs9F/T1j4EflFA+gVWSkzTvwSQlY2+1e9c4gawLUYIS45jBNBz1D 3moa/s+Id57xdQrFGjGZGBRX57BHkSrx0Upf9uW4k44EUzmXEPgehAO8XKTv1YPKVsZ1 hfvSj/ZQZ9apWSv+Sjs+AmsvIsBenEeIFFMRAfD+VNDzL7pdQs9mwj4ono/IOQ85C2Tu FSFCa1DVIGZ7mdp9EldSJpEy6dn0OKBgn1ITy8zjVpuemeeiFGChuV8E617gGLR5kwKs SVNZXRxgRIVX550KtCVFcb+a+1J9zZL84DztFmJpmsWifZPKeG3s7z4NV2siYrzgMvc4 sz+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id mp7-20020a17090b190700b0026ce592a7absi2876030pjb.81.2023.09.13.19.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 19:58:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CFE3281BEE91; Wed, 13 Sep 2023 09:39:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230401AbjIMQjM (ORCPT <rfc822;pwkd43@gmail.com> + 35 others); Wed, 13 Sep 2023 12:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230363AbjIMQjF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Sep 2023 12:39:05 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4487C19BB; Wed, 13 Sep 2023 09:39:01 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 43C2F1007; Wed, 13 Sep 2023 09:39:38 -0700 (PDT) Received: from merodach.members.linode.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 493C83F5A1; Wed, 13 Sep 2023 09:38:59 -0700 (PDT) From: James Morse <james.morse@arm.com> 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 Cc: x86@kernel.org, Salil Mehta <salil.mehta@huawei.com>, Russell King <linux@armlinux.org.uk>, Jean-Philippe Brucker <jean-philippe@linaro.org>, jianyong.wu@arm.com, justin.he@arm.com Subject: [RFC PATCH v2 04/35] drivers: base: Move cpu_dev_init() after node_dev_init() Date: Wed, 13 Sep 2023 16:37:52 +0000 Message-Id: <20230913163823.7880-5-james.morse@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230913163823.7880-1-james.morse@arm.com> References: <20230913163823.7880-1-james.morse@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Sep 2023 09:39:13 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776980130967329328 X-GMAIL-MSGID: 1776980130967329328 |
Series |
ACPI/arm64: add support for virtual cpuhotplug
|
|
Commit Message
James Morse
Sept. 13, 2023, 4:37 p.m. UTC
NUMA systems require the node descriptions to be ready before CPUs are
registered. This is so that the node symlinks can be created in sysfs.
Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs
are registered by arch code, instead of cpu_dev_init().
Move cpu_dev_init() after node_dev_init() so that NUMA architectures
can use GENERIC_CPU_DEVICES.
Signed-off-by: James Morse <james.morse@arm.com>
---
drivers/base/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, Sep 13, 2023 at 04:37:52PM +0000, James Morse wrote: > NUMA systems require the node descriptions to be ready before CPUs are > registered. This is so that the node symlinks can be created in sysfs. > > Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs > are registered by arch code, instead of cpu_dev_init(). > > Move cpu_dev_init() after node_dev_init() so that NUMA architectures > can use GENERIC_CPU_DEVICES. > > Signed-off-by: James Morse <james.morse@arm.com> I think this patch should be merged sooner rather than later so that it gets a longer time to be tested, as moving the order that things happen in init/main.c can be problematical. Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Thanks!
On Wed, 13 Sep 2023 16:37:52 +0000 James Morse <james.morse@arm.com> wrote: > NUMA systems require the node descriptions to be ready before CPUs are > registered. This is so that the node symlinks can be created in sysfs. > > Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs > are registered by arch code, instead of cpu_dev_init(). Worth saying why this matters I think. I wrote a nice note on that being a possible problem path as node_dev_init() uses the results of cpu_dev_init() if CONFIG_GENERIC_CPU_DEVICES before seeing this comment and realizing you had it covered (sort of anyway). > > Move cpu_dev_init() after node_dev_init() so that NUMA architectures > can use GENERIC_CPU_DEVICES. > > Signed-off-by: James Morse <james.morse@arm.com> > --- > drivers/base/init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/base/init.c b/drivers/base/init.c > index 397eb9880cec..c4954835128c 100644 > --- a/drivers/base/init.c > +++ b/drivers/base/init.c > @@ -35,8 +35,8 @@ void __init driver_init(void) > of_core_init(); > platform_bus_init(); > auxiliary_bus_init(); > - cpu_dev_init(); > memory_dev_init(); > node_dev_init(); > + cpu_dev_init(); > container_dev_init(); > }
diff --git a/drivers/base/init.c b/drivers/base/init.c index 397eb9880cec..c4954835128c 100644 --- a/drivers/base/init.c +++ b/drivers/base/init.c @@ -35,8 +35,8 @@ void __init driver_init(void) of_core_init(); platform_bus_init(); auxiliary_bus_init(); - cpu_dev_init(); memory_dev_init(); node_dev_init(); + cpu_dev_init(); container_dev_init(); }