summaryrefslogtreecommitdiffstats
path: root/include/linux/cpumask.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-25 03:08:08 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 08:22:59 -0800
commitccb46000f4bb459777686611157ac0eac928704e (patch)
tree461e956d9e27a7afa7de64950f3186070ffa61f5 /include/linux/cpumask.h
parent64b91379439ff0fb007bde90eb496299c14a9b2a (diff)
downloadop-kernel-dev-ccb46000f4bb459777686611157ac0eac928704e.zip
op-kernel-dev-ccb46000f4bb459777686611157ac0eac928704e.tar.gz
[PATCH] cpumask: uninline first_cpu()
text data bss dec hex filename before: 3490577 1322408 360000 5172985 4eeef9 vmlinux after: 3488027 1322496 360128 5170651 4ee5db vmlinux Cc: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r--include/linux/cpumask.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 60e56c6..9b702fd 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -212,11 +212,12 @@ static inline void __cpus_shift_left(cpumask_t *dstp,
bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
}
-#define first_cpu(src) __first_cpu(&(src), NR_CPUS)
-static inline int __first_cpu(const cpumask_t *srcp, int nbits)
-{
- return min_t(int, nbits, find_first_bit(srcp->bits, nbits));
-}
+#ifdef CONFIG_SMP
+int __first_cpu(const cpumask_t *srcp);
+#define first_cpu(src) __first_cpu(&(src))
+#else
+#define first_cpu(src) 0
+#endif
#define next_cpu(n, src) __next_cpu((n), &(src), NR_CPUS)
static inline int __next_cpu(int n, const cpumask_t *srcp, int nbits)
OpenPOWER on IntegriCloud