Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp659264pxb; Tue, 1 Feb 2022 07:53:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4ehLbiMfnf6f7+tHVCg8ruykCgkvjQr7D/Q15Q2+cEzWyoN8KofBb6W4b5ALK9ThL/CfY X-Received: by 2002:a17:902:8f96:: with SMTP id z22mr26267331plo.2.1643730829554; Tue, 01 Feb 2022 07:53:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643730829; cv=none; d=google.com; s=arc-20160816; b=lvMXlmgHLL0qrzwthqE1RhXCMmTcbJq9zlqL109u6Qn/rIfsIz/nwpX30efkjl4QRH ElP2Dy7H/ihuxqmZQ0lS714WvvtO/BQBu96sRILa6t+5b1B5B2qaFjXu5UR4KCYaUVYj Uy9VnbdrncJqMdu5b/2IBpqtzHcVFW28QtOJ5bUKXnfd6AObGleZ6tpWCqRbOoluOWy+ zJJxjF3tO+mphsjN2icxsgen2ymwsGFnGng9qU2GW5ftkI92XMpBvQQRvW7GlNQbvL7a oxdxs2A0Ewrgmd5S0dLvB15bTODujzgXg5C9b4zf3EV9YIA9Eh7jqALNzU29bmzz+7vT ZJOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=JzKQsvVlnpndbALvMTXcll7uzoa8T8eje3Q/bEI6mLM=; b=xIpxWXnVFUMymDLdB1aL/uXJ19i5nYilbZ/fiik6oiR4v37FCY/AMQhU2eiqQmPwjK mu1lFencY/V/olcEpyVoW3fQzLzRYkHUxJQGC/bBcJXdZno+dy2xgSZAjdPWkL/+8bO9 vjniBvAB4WiCB1MYkyU1ntsF0dGQQaX+fDXMMbpSSNxFHJ0IoqsoAE0r5voGqwotCaWz 0HnB7I6YeeHEQsHetm/BO3SeBToWi28jRfILD6G+7lq8y3033ha6RJjpwGWr5a+OJ77l ulJ4SRtWTBJ1nCeXvRh0A6wpjKO7x8fh0WpUec1CM3f7B/VuVCU340B+d6/z/QqkJ1so WxXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=whj9BP6W; dkim=neutral (no key) header.i=@suse.de header.b=hfnhf0Ax; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 74si15935049pgc.808.2022.02.01.07.53.37; Tue, 01 Feb 2022 07:53:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=whj9BP6W; dkim=neutral (no key) header.i=@suse.de header.b=hfnhf0Ax; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241094AbiAaJle (ORCPT + 99 others); Mon, 31 Jan 2022 04:41:34 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]:37216 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238819AbiAaJlb (ORCPT ); Mon, 31 Jan 2022 04:41:31 -0500 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D40441F386; Mon, 31 Jan 2022 09:41:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1643622089; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JzKQsvVlnpndbALvMTXcll7uzoa8T8eje3Q/bEI6mLM=; b=whj9BP6WhckdM25U/uFRLjh/5qEA3XBP2rJPmH/OFUiuQqSEmH4Kse73Ly2XNl7aeGy0D3 01nHUqxo5dFMLh/5OT1osDi6I//FYqxJOBWDlV7Pa2kDxDqS7SZU6eGFbFwhiIxa2yrWJn q2KzYMXrYzBSbk968nxUdzIBj5Xav5c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1643622089; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JzKQsvVlnpndbALvMTXcll7uzoa8T8eje3Q/bEI6mLM=; b=hfnhf0Ax+T4HdOjPQUboSd+ahGSEWUJYPr8iA9X+hUzJN0iQJC+aThno6atUOIFQQBrLSh W6EpHbrVTLIU+YBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 366CE13B68; Mon, 31 Jan 2022 09:41:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2RKbCsiu92FODwAAMHmgww (envelope-from ); Mon, 31 Jan 2022 09:41:28 +0000 Date: Mon, 31 Jan 2022 10:41:26 +0100 From: Oscar Salvador To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Greg Kroah-Hartman , Michal Hocko , 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@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org Subject: Re: [PATCH RFC v1] drivers/base/node: consolidate node device subsystem initialization in node_dev_init() Message-ID: <20220131094125.GB15392@linux> References: <20220128151540.164759-1-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220128151540.164759-1-david@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 28, 2022 at 04:15:40PM +0100, 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(). > > Cc: Andrew Morton > Cc: Greg Kroah-Hartman > Cc: Michal Hocko > Cc: Oscar Salvador > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Thomas Bogendoerfer > Cc: Michael Ellerman > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Paul Walmsley > Cc: Palmer Dabbelt > Cc: Albert Ou > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Yoshinori Sato > Cc: Rich Felker > Cc: "David S. Miller" > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: Dave Hansen > Cc: "Rafael J. Wysocki" > Cc: x86@kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Cc: linux-ia64@vger.kernel.org > Cc: linux-mips@vger.kernel.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-riscv@lists.infradead.org > Cc: linux-s390@vger.kernel.org > Cc: linux-sh@vger.kernel.org > Cc: sparclinux@vger.kernel.org > Cc: linux-mm@kvack.org > Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE Labs