[PATCH RFC v1] drivers/base/node: consolidate node device subsystem initialization in node_dev_init()

Anatoly Pugachev matorola at gmail.com
Tue Feb 1 21:02:45 AEDT 2022


On Mon, Jan 31, 2022 at 2:11 PM David Hildenbrand <david at redhat.com> 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 <matorola at gmail.com> (sparc64)


More information about the Linuxppc-dev mailing list