aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpumask.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r--include/linux/cpumask.h6
1 files changed, 5 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))