aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpumask.h6
-rw-r--r--include/linux/cpuset.h7
2 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index c24875bd9c5b..d614d2472798 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -359,13 +359,14 @@ static inline void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp,
359 359
360/* 360/*
361 * The following particular system cpumasks and operations manage 361 * The following particular system cpumasks and operations manage
362 * possible, present and online cpus. Each of them is a fixed size 362 * possible, present, active and online cpus. Each of them is a fixed size
363 * bitmap of size NR_CPUS. 363 * bitmap of size NR_CPUS.
364 * 364 *
365 * #ifdef CONFIG_HOTPLUG_CPU 365 * #ifdef CONFIG_HOTPLUG_CPU
366 * cpu_possible_map - has bit 'cpu' set iff cpu is populatable 366 * cpu_possible_map - has bit 'cpu' set iff cpu is populatable
367 * cpu_present_map - has bit 'cpu' set iff cpu is populated 367 * cpu_present_map - has bit 'cpu' set iff cpu is populated
368 * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler 368 * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler
369 * cpu_active_map - has bit 'cpu' set iff cpu available to migration
369 * #else 370 * #else
370 * cpu_possible_map - has bit 'cpu' set iff cpu is populated 371 * cpu_possible_map - has bit 'cpu' set iff cpu is populated
371 * cpu_present_map - copy of cpu_possible_map 372 * cpu_present_map - copy of cpu_possible_map
@@ -416,6 +417,7 @@ static inline void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp,
416extern cpumask_t cpu_possible_map; 417extern cpumask_t cpu_possible_map;
417extern cpumask_t cpu_online_map; 418extern cpumask_t cpu_online_map;
418extern cpumask_t cpu_present_map; 419extern cpumask_t cpu_present_map;
420extern cpumask_t cpu_active_map;
419 421
420#if NR_CPUS > 1 422#if NR_CPUS > 1
421#define num_online_cpus() cpus_weight(cpu_online_map) 423#define num_online_cpus() cpus_weight(cpu_online_map)
@@ -424,6 +426,7 @@ extern cpumask_t cpu_present_map;
424#define cpu_online(cpu) cpu_isset((cpu), cpu_online_map) 426#define cpu_online(cpu) cpu_isset((cpu), cpu_online_map)
425#define cpu_possible(cpu) cpu_isset((cpu), cpu_possible_map) 427#define cpu_possible(cpu) cpu_isset((cpu), cpu_possible_map)
426#define cpu_present(cpu) cpu_isset((cpu), cpu_present_map) 428#define cpu_present(cpu) cpu_isset((cpu), cpu_present_map)
429#define cpu_active(cpu) cpu_isset((cpu), cpu_active_map)
427#else 430#else
428#define num_online_cpus() 1 431#define num_online_cpus() 1
429#define num_possible_cpus() 1 432#define num_possible_cpus() 1
@@ -431,6 +434,7 @@ extern cpumask_t cpu_present_map;
431#define cpu_online(cpu) ((cpu) == 0) 434#define cpu_online(cpu) ((cpu) == 0)
432#define cpu_possible(cpu) ((cpu) == 0) 435#define cpu_possible(cpu) ((cpu) == 0)
433#define cpu_present(cpu) ((cpu) == 0) 436#define cpu_present(cpu) ((cpu) == 0)
437#define cpu_active(cpu) ((cpu) == 0)
434#endif 438#endif
435 439
436#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) 440#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 038578362b47..e8f450c499b0 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -78,6 +78,8 @@ extern void cpuset_track_online_nodes(void);
78 78
79extern int current_cpuset_is_being_rebound(void); 79extern int current_cpuset_is_being_rebound(void);
80 80
81extern void rebuild_sched_domains(void);
82
81#else /* !CONFIG_CPUSETS */ 83#else /* !CONFIG_CPUSETS */
82 84
83static inline int cpuset_init_early(void) { return 0; } 85static inline int cpuset_init_early(void) { return 0; }
@@ -156,6 +158,11 @@ static inline int current_cpuset_is_being_rebound(void)
156 return 0; 158 return 0;
157} 159}
158 160
161static inline void rebuild_sched_domains(void)
162{
163 partition_sched_domains(0, NULL, NULL);
164}
165
159#endif /* !CONFIG_CPUSETS */ 166#endif /* !CONFIG_CPUSETS */
160 167
161#endif /* _LINUX_CPUSET_H */ 168#endif /* _LINUX_CPUSET_H */