Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1918004pxb; Wed, 2 Feb 2022 15:56:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvITxRcvm8xSJhopWITE1Ba4EezXRi0SXFiQ6E0hrcNBBjwyynNNI5tAuyKymMQonj8DNZ X-Received: by 2002:a17:90b:4ad0:: with SMTP id mh16mr10756917pjb.89.1643846179088; Wed, 02 Feb 2022 15:56:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643846179; cv=none; d=google.com; s=arc-20160816; b=ROe9FEKj3qmZStTp0L66FZlzA/uZu/VJYepYagFB4ZGm7cw4OGD32o54Cbmc+7zvQ/ cbX63vvktAD/bFAxCoXS7xxibh/xtChXVzXz65JYo96Wjz6bMvaqzhk8iiB93s5GpSds mltxBL9yciChR7lYt1uKPAebrPG85Rm5fqp7yb9wluCAzZ+mGOhE5mIDck3VVCeeqP3t zr7M3Jb4DspMprgzRP+gb/CZHRws/yEAitoFSHnWiKC9hgxBCdRgf1oUj8IHbbpgUuwY fcTB/Dn8+UmWo8NwqVV+KIhoJkQKVhgA2S9lr3OR6A7kpuoJJaW0HOv7Buyirre1s5xm JcFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=mClIZuGiU90N8/wVEGuz0kPrT8HDVsO1SF0mMBp9TKA=; b=T08Bt1ih57D4fPcpMKZ2sE02uFLJtQTRoFLq5PCQUUUgsN32UN0ONd4bbURqwC7JNs 6XuwRXAsF3O5WtmL0UM7GRRcWRM3Poh6vl4GiRLgtVaOH3D5UxGZ4sf+qFD1B3X8+OX9 5YMYOqtSyeV43XZfJw2QLjnnBci2iNiPMOJafujZy7CmQQF/08UtJwAvXB2U8NfwXMaz wXMzdQAp6pz/ajbWJ3Yj4lVMUsevmXUhM+HGlXOVtEKTkVr5PCjDYYRyk1yrxxJBpBKo Z/PgH0gHCgTgXOpNz5cpYqSx8cRiQTepy2a5vL1gLpzB9ZiBy4XAKRTmUTGWaEZ3cYwV LADw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=m8l3iizy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u16si19605930ple.104.2022.02.02.15.56.06; Wed, 02 Feb 2022 15:56:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=m8l3iizy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236257AbiBAKDB (ORCPT + 99 others); Tue, 1 Feb 2022 05:03:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234247AbiBAKDA (ORCPT ); Tue, 1 Feb 2022 05:03:00 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EC79C061714; Tue, 1 Feb 2022 02:03:00 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id s5so52213096ejx.2; Tue, 01 Feb 2022 02:03:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mClIZuGiU90N8/wVEGuz0kPrT8HDVsO1SF0mMBp9TKA=; b=m8l3iizy6m+bL/jBYQ1WY3ATqWzlyg2KTCyNULM3eVNvkC5wqKTucOmaIxZWFKKHKC O4vEtqtNwuq399PL5WPFG5Z7vCu6zPPjoimtCnr8vb/5lojlVqjvZJwxMJzVd0Vk35+r ZVAR+4L1KqtGJhgkD+zr3U76KGUGG1P7/BPweFRor+Y6JBV2yCS0CX+UFmYJA0lC10As KSMXOwfQMpM5C1cOo7NxFB454lv8KZ0AWzZzM/pxNJiKv31JpTcyWfsVCUPzCl573dFS WOqZrDF8DuO60afmvVeUg1FCdgzqdmHYIJrUyRb6laaV9nlyKLCU0X2qcosie45x9Rgc yezw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mClIZuGiU90N8/wVEGuz0kPrT8HDVsO1SF0mMBp9TKA=; b=AjJnTwOTz4vQWsalBUistg/e6KCqcUfSw6yBKo6WhEm4kjQkqSqmSfYN4bRDCIoUmJ nazF20oNS3SSaIGS6zyx00FESNliOYJiXb2yMkyDCIAy3GNDuHqm7i2qYM/h15YhvFq9 NlFxQq6uEGixCPYsbXru822uL536p1G19p6X2sKqSb+/72o/SDIba0WLU+07dMW55gSP Dx4Vxvnu2Fk4Ps2vJT+shObijSRHz7a92x1T9G5qqq/YYnXYa3OqW1uQ5iCLVHzZADz6 /CpJkCDPdrZiD+BpzcgoscbJsSKll6M7a8VrgssNyf07zzwW1p6H3BwNt+T7ecye0V2z luHg== X-Gm-Message-State: AOAM530Yxswqg3PeicJhuNMg8ZwE75fDf/cd+2pDttVOqlXoGDSsWccA ax2IsivtFZ0XbBS6NubsjIb3QENKQWVEd2PGoKU= X-Received: by 2002:a17:907:1c1c:: with SMTP id nc28mr20280513ejc.651.1643709778741; Tue, 01 Feb 2022 02:02:58 -0800 (PST) MIME-Version: 1.0 References: <20220128151540.164759-1-david@redhat.com> In-Reply-To: <20220128151540.164759-1-david@redhat.com> From: Anatoly Pugachev Date: Tue, 1 Feb 2022 13:02:45 +0300 Message-ID: Subject: Re: [PATCH RFC v1] drivers/base/node: consolidate node device subsystem initialization in node_dev_init() To: David Hildenbrand Cc: Linux Kernel list , linux-mm , Andrew Morton , Greg Kroah-Hartman , Michal Hocko , Oscar Salvador , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Yoshinori Sato , Rich Felker , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "Rafael J. Wysocki" , x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390 , linux-sh@vger.kernel.org, Sparc kernel list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 31, 2022 at 2:11 PM David Hildenbrand wrote: > > ... and call node_dev_init() after memory_dev_init() from driver_init(), > so before any of the existing arch/subsys calls. All online nodes should > be known at that point. > > This is in line with memory_dev_init(), which initializes the memory > device subsystem and creates all memory block devices. > > Similar to memory_dev_init(), panic() if anything goes wrong, we don't > want to continue with such basic initialization errors. > > The important part is that node_dev_init() gets called after > memory_dev_init() and after cpu_dev_init(), but before any of the > relevant archs call register_cpu() to register the new cpu device under > the node device. The latter should be the case for the current users > of topology_init(). > > RFC because I tested only on x86-64 and s390x, I think I cross-compiled all > applicable architectures except riscv and sparc. Compiled and boot tested on sparc. Tested-by: Anatoly Pugachev (sparc64)