summaryrefslogtreecommitdiffstats
path: root/kernel/sched/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched/debug.c')
-rw-r--r--kernel/sched/debug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index de3de997e245..8039d62ae36e 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -315,6 +315,7 @@ void register_sched_domain_sysctl(void)
315{ 315{
316 static struct ctl_table *cpu_entries; 316 static struct ctl_table *cpu_entries;
317 static struct ctl_table **cpu_idx; 317 static struct ctl_table **cpu_idx;
318 static bool init_done = false;
318 char buf[32]; 319 char buf[32];
319 int i; 320 int i;
320 321
@@ -344,7 +345,10 @@ void register_sched_domain_sysctl(void)
344 if (!cpumask_available(sd_sysctl_cpus)) { 345 if (!cpumask_available(sd_sysctl_cpus)) {
345 if (!alloc_cpumask_var(&sd_sysctl_cpus, GFP_KERNEL)) 346 if (!alloc_cpumask_var(&sd_sysctl_cpus, GFP_KERNEL))
346 return; 347 return;
348 }
347 349
350 if (!init_done) {
351 init_done = true;
348 /* init to possible to not have holes in @cpu_entries */ 352 /* init to possible to not have holes in @cpu_entries */
349 cpumask_copy(sd_sysctl_cpus, cpu_possible_mask); 353 cpumask_copy(sd_sysctl_cpus, cpu_possible_mask);
350 } 354 }