From ccb46000f4bb459777686611157ac0eac928704e Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 25 Mar 2006 03:08:08 -0800 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/Makefile | 2 ++ lib/cpumask.c | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 lib/cpumask.c (limited to 'lib') diff --git a/lib/Makefile b/lib/Makefile index 648b2c1242fd..f827e3c24ec0 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -7,6 +7,8 @@ lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \ idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \ sha1.o +lib-$(CONFIG_SMP) += cpumask.o + lib-y += kobject.o kref.o kobject_uevent.o klist.o obj-y += sort.o parser.o halfmd4.o iomap_copy.o diff --git a/lib/cpumask.c b/lib/cpumask.c new file mode 100644 index 000000000000..1560d97390dd --- /dev/null +++ b/lib/cpumask.c @@ -0,0 +1,11 @@ +#include +#include +#include +#include + +int __first_cpu(const cpumask_t *srcp) +{ + return min_t(int, NR_CPUS, find_first_bit(srcp->bits, NR_CPUS)); +} +EXPORT_SYMBOL(__first_cpu); + -- cgit v1.2.2