cpu: Mark cpu_possible_mask as __ro_after_init
authorAlexey Dobriyan <adobriyan@gmail.com>
Mon, 5 Feb 2024 10:01:19 +0000 (13:01 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 19 Feb 2024 17:05:47 +0000 (18:05 +0100)
cpu_possible_mask is by definition "cpus which could be hotplugged without
reboot". It's a property which is fixed after kernel enumerates the
hardware configuration.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/41cd78af-92a3-4f23-8c7a-4316a04a66d8@p183
kernel/cpu.c

index ad7d0b00bce9931cbb93fbfe097f4451cd84dfa2..7b36b3a4e33654083c06f7326cae1ea009f9394b 100644 (file)
@@ -3106,10 +3106,10 @@ const DECLARE_BITMAP(cpu_all_bits, NR_CPUS) = CPU_BITS_ALL;
 EXPORT_SYMBOL(cpu_all_bits);
 
 #ifdef CONFIG_INIT_ALL_POSSIBLE
-struct cpumask __cpu_possible_mask __read_mostly
+struct cpumask __cpu_possible_mask __ro_after_init;
        = {CPU_BITS_ALL};
 #else
-struct cpumask __cpu_possible_mask __read_mostly;
+struct cpumask __cpu_possible_mask __ro_after_init;
 #endif
 EXPORT_SYMBOL(__cpu_possible_mask);