Skip to content

Commit

Permalink
cpu: Mark cpu_possible_mask as __ro_after_init
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/41cd78af-92a3-4f23-8c7a-4316a04a66d8@p183
  • Loading branch information
Alexey Dobriyan authored and KAGA-KOKO committed Feb 19, 2024
1 parent effe6d2 commit da92df4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit da92df4

Please sign in to comment.