Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax
In directory sc8-pr-cvs1:/tmp/cvs-serv6058
Modified Files:
bitops.h mmu_context.h
Log Message:
sched_find_first_bit moved from mmu_context.h to bitops.h in 2.5.5
Index: bitops.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/bitops.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- bitops.h 6 Jun 2002 00:06:11 -0000 1.5
+++ bitops.h 1 Dec 2002 23:54:43 -0000 1.6
@@ -6,6 +6,7 @@
*/
#include <linux/config.h>
+#include <linux/compiler.h>
/*
* These have to be done with inline assembly: that way the bit-setting
@@ -356,6 +357,28 @@
}
#ifdef __KERNEL__
+
+ /*
+ * Every architecture must define this function. It's the fastest
+ * way of searching a 168-bit bitmap where the first 100 bits are
+ * unlikely to be set. It's guaranteed that at least one of the 140
+ * bits is set.
+ */
+
+static inline int sched_find_first_bit(unsigned long *b)
+{
+ if (unlikely(b[0]))
+ return __ffs(b[0]);
+ if (unlikely(b[1]))
+ return __ffs(b[1]) + 32;
+ if (unlikely(b[2]))
+ return __ffs(b[2]) + 64;
+ if (b[3])
+ return __ffs(b[3]) + 96;
+ return __ffs(b[4]) + 128;
+}
+
+
/**
* ffs - find first bit set
* @x: the word to search
Index: mmu_context.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mmu_context.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mmu_context.h 6 Jun 2002 00:07:33 -0000 1.5
+++ mmu_context.h 1 Dec 2002 23:54:43 -0000 1.6
@@ -3,33 +3,4 @@
#include <asm/mm/mmu_context.h>
-/* This was introduced in 2.5.2 and for some strange reason, was
- implemented in this header file for i386/sparc/sparc64. */
-
- /*
- * Every architecture must define this function. It's the fastest
- * way of searching a 168-bit bitmap where the first 128 bits are
- * unlikely to be set. It's guaranteed that at least one of the 168
- * bits is cleared.
- */
-#if MAX_RT_PRIO != 128 || MAX_PRIO != 168
-# error update this function.
-#endif
-
-static inline int sched_find_first_bit(unsigned long *b)
-{
- if (unlikely(b[0]))
- return __ffs(b[0]);
- if (unlikely(b[1]))
- return __ffs(b[1]) + 32;
- if (unlikely(b[2]))
- return __ffs(b[2]) + 64;
- if (unlikely(b[3]))
- return __ffs(b[3]) + 96;
- if (b[4])
- return __ffs(b[4]) + 128;
- return __ffs(b[5]) + 32 + 128;
-}
-
-
#endif /* __VAX_TMP_MMUCONTEXT_H */
|