Skip to content

Commit da92df4

Browse files
Alexey DobriyanKAGA-KOKO
authored andcommitted
cpu: Mark cpu_possible_mask as __ro_after_init
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
1 parent effe6d2 commit da92df4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kernel/cpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3106,10 +3106,10 @@ const DECLARE_BITMAP(cpu_all_bits, NR_CPUS) = CPU_BITS_ALL;
31063106
EXPORT_SYMBOL(cpu_all_bits);
31073107

31083108
#ifdef CONFIG_INIT_ALL_POSSIBLE
3109-
struct cpumask __cpu_possible_mask __read_mostly
3109+
struct cpumask __cpu_possible_mask __ro_after_init;
31103110
= {CPU_BITS_ALL};
31113111
#else
3112-
struct cpumask __cpu_possible_mask __read_mostly;
3112+
struct cpumask __cpu_possible_mask __ro_after_init;
31133113
#endif
31143114
EXPORT_SYMBOL(__cpu_possible_mask);
31153115

0 commit comments

Comments
 (0)