Skip to content

Commit d61dd79

Browse files
committed
powerpc/smp: Add __ro_after_init attribute
JIRA: https://issues.redhat.com/browse/RHEL-118964 commit fd535a8 Author: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Date: Thu Dec 14 23:37:13 2023 +0530 powerpc/smp: Add __ro_after_init attribute There are some variables that are only updated at boot time. So add __ro_after_init attribute to such variables Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20231214180720.310852-4-srikar@linux.vnet.ibm.com Signed-off-by: Phil Auld <pauld@redhat.com>
1 parent 73f7f2a commit d61dd79

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/powerpc/kernel/smp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ static DEFINE_PER_CPU(int, cpu_state) = { 0 };
7979
#endif
8080

8181
struct task_struct *secondary_current;
82-
bool has_big_cores;
83-
bool coregroup_enabled;
84-
bool thread_group_shares_l2;
85-
bool thread_group_shares_l3;
82+
bool has_big_cores __ro_after_init;
83+
bool coregroup_enabled __ro_after_init;
84+
bool thread_group_shares_l2 __ro_after_init;
85+
bool thread_group_shares_l3 __ro_after_init;
8686

8787
DEFINE_PER_CPU(cpumask_var_t, cpu_sibling_map);
8888
DEFINE_PER_CPU(cpumask_var_t, cpu_smallcore_map);
@@ -1000,7 +1000,7 @@ static int __init init_thread_group_cache_map(int cpu, int cache_property)
10001000
return 0;
10011001
}
10021002

1003-
static bool shared_caches;
1003+
static bool shared_caches __ro_after_init;
10041004

10051005
#ifdef CONFIG_SCHED_SMT
10061006
/* cpumask of CPUs with asymmetric SMT dependency */

0 commit comments

Comments
 (0)