cpu/hotplug: Initialise all cpuhp_cpu_state structs earlier
authorSteven Price <steven.price@arm.com>
Mon, 11 Apr 2022 15:22:33 +0000 (16:22 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 13 Apr 2022 19:27:41 +0000 (21:27 +0200)
commitd308077e5e4dc8c93f97f5ebc70274e7c7a92d49
tree7d4128c5e26bcddf97c2765bf1a5f002f1e9e152
parent3927368bebe2e7af4ae18bdd77e02aa0d2629411
cpu/hotplug: Initialise all cpuhp_cpu_state structs earlier

Rather than waiting until a CPU is first brought online, do the
initialisation of the cpuhp_cpu_state structure for each CPU during the
__init phase. This saves a (small) amount of non-__init memory and
avoids potential confusion about when the cpuhp_cpu_state struct is
valid.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20220411152233.474129-3-steven.price@arm.com
kernel/cpu.c