topology.c (74be62c7cefbf320e0605f3da6639ef80448ff00) topology.c (4d13a06d54c415238325b0fe2c14f1052da4512f)
1/*
2 * Scheduler topology setup/handling methods
3 */
4#include <linux/sched.h>
5#include <linux/mutex.h>
6
7#include "sched.h"
8

--- 247 unchanged lines hidden (view full) ---

256 raw_spin_unlock_irqrestore(&rq->lock, flags);
257
258 if (old_rd)
259 call_rcu_sched(&old_rd->rcu, free_rootdomain);
260}
261
262static int init_rootdomain(struct root_domain *rd)
263{
1/*
2 * Scheduler topology setup/handling methods
3 */
4#include <linux/sched.h>
5#include <linux/mutex.h>
6
7#include "sched.h"
8

--- 247 unchanged lines hidden (view full) ---

256 raw_spin_unlock_irqrestore(&rq->lock, flags);
257
258 if (old_rd)
259 call_rcu_sched(&old_rd->rcu, free_rootdomain);
260}
261
262static int init_rootdomain(struct root_domain *rd)
263{
264 memset(rd, 0, sizeof(*rd));
265
266 if (!zalloc_cpumask_var(&rd->span, GFP_KERNEL))
267 goto out;
268 if (!zalloc_cpumask_var(&rd->online, GFP_KERNEL))
269 goto free_span;
270 if (!zalloc_cpumask_var(&rd->dlo_mask, GFP_KERNEL))
271 goto free_online;
272 if (!zalloc_cpumask_var(&rd->rto_mask, GFP_KERNEL))
273 goto free_dlo_mask;

--- 32 unchanged lines hidden (view full) ---

306
307 atomic_set(&def_root_domain.refcount, 1);
308}
309
310static struct root_domain *alloc_rootdomain(void)
311{
312 struct root_domain *rd;
313
264 if (!zalloc_cpumask_var(&rd->span, GFP_KERNEL))
265 goto out;
266 if (!zalloc_cpumask_var(&rd->online, GFP_KERNEL))
267 goto free_span;
268 if (!zalloc_cpumask_var(&rd->dlo_mask, GFP_KERNEL))
269 goto free_online;
270 if (!zalloc_cpumask_var(&rd->rto_mask, GFP_KERNEL))
271 goto free_dlo_mask;

--- 32 unchanged lines hidden (view full) ---

304
305 atomic_set(&def_root_domain.refcount, 1);
306}
307
308static struct root_domain *alloc_rootdomain(void)
309{
310 struct root_domain *rd;
311
314 rd = kmalloc(sizeof(*rd), GFP_KERNEL);
312 rd = kzalloc(sizeof(*rd), GFP_KERNEL);
315 if (!rd)
316 return NULL;
317
318 if (init_rootdomain(rd) != 0) {
319 kfree(rd);
320 return NULL;
321 }
322

--- 1584 unchanged lines hidden ---
313 if (!rd)
314 return NULL;
315
316 if (init_rootdomain(rd) != 0) {
317 kfree(rd);
318 return NULL;
319 }
320

--- 1584 unchanged lines hidden ---