diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/cpumask.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 94a2ab88ae85..d4bf52603e6b 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -510,9 +510,6 @@ extern cpumask_t cpu_active_map; | |||
510 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | 510 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ |
511 | } | 511 | } |
512 | 512 | ||
513 | /* This produces more efficient code. */ | ||
514 | #define nr_cpumask_bits NR_CPUS | ||
515 | |||
516 | #else /* NR_CPUS > BITS_PER_LONG */ | 513 | #else /* NR_CPUS > BITS_PER_LONG */ |
517 | 514 | ||
518 | #define CPU_BITS_ALL \ | 515 | #define CPU_BITS_ALL \ |
@@ -520,9 +517,15 @@ extern cpumask_t cpu_active_map; | |||
520 | [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ | 517 | [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ |
521 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | 518 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ |
522 | } | 519 | } |
520 | #endif /* NR_CPUS > BITS_PER_LONG */ | ||
523 | 521 | ||
522 | #ifdef CONFIG_CPUMASK_OFFSTACK | ||
523 | /* Assuming NR_CPUS is huge, a runtime limit is more efficient. Also, | ||
524 | * not all bits may be allocated. */ | ||
524 | #define nr_cpumask_bits nr_cpu_ids | 525 | #define nr_cpumask_bits nr_cpu_ids |
525 | #endif /* NR_CPUS > BITS_PER_LONG */ | 526 | #else |
527 | #define nr_cpumask_bits NR_CPUS | ||
528 | #endif | ||
526 | 529 | ||
527 | /* verify cpu argument to cpumask_* operators */ | 530 | /* verify cpu argument to cpumask_* operators */ |
528 | static inline unsigned int cpumask_check(unsigned int cpu) | 531 | static inline unsigned int cpumask_check(unsigned int cpu) |