diff options
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r-- | include/linux/cpumask.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 60e56c6e03dd..9b702fd24a72 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -212,11 +212,12 @@ static inline void __cpus_shift_left(cpumask_t *dstp, | |||
212 | bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); | 212 | bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); |
213 | } | 213 | } |
214 | 214 | ||
215 | #define first_cpu(src) __first_cpu(&(src), NR_CPUS) | 215 | #ifdef CONFIG_SMP |
216 | static inline int __first_cpu(const cpumask_t *srcp, int nbits) | 216 | int __first_cpu(const cpumask_t *srcp); |
217 | { | 217 | #define first_cpu(src) __first_cpu(&(src)) |
218 | return min_t(int, nbits, find_first_bit(srcp->bits, nbits)); | 218 | #else |
219 | } | 219 | #define first_cpu(src) 0 |
220 | #endif | ||
220 | 221 | ||
221 | #define next_cpu(n, src) __next_cpu((n), &(src), NR_CPUS) | 222 | #define next_cpu(n, src) __next_cpu((n), &(src), NR_CPUS) |
222 | static inline int __next_cpu(int n, const cpumask_t *srcp, int nbits) | 223 | static inline int __next_cpu(int n, const cpumask_t *srcp, int nbits) |