patch-2.1.48 linux/arch/ppc/kernel/support.c

Next file: linux/arch/ppc/kernel/syscalls.c
Previous file: linux/arch/ppc/kernel/stubs.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.47/linux/arch/ppc/kernel/support.c linux/arch/ppc/kernel/support.c
@@ -1,84 +0,0 @@
-/*
- * Miscellaneous support routines
- */
-
-#include <asm/bitops.h>
-
-/*extern __inline__*/ int find_first_zero_bit(void *add, int len)
-{
-	int	mask, nr, i;
-	BITFIELD *addr = add;
-	nr = 0;
-	while (len)
-	{
-		if (~*addr != 0)
-		{ /* Contains at least one zero */
-			for (i = 0;  i < 32;  i++, nr++)
-			{
-				mask = BIT(nr);
-				if ((mask & *addr) == 0)
-				{
-					return (nr);
-				}
-			}
-		}
-		len -= 32;
-		addr++;
-		nr += 32;
-	}
-	return (0);  /* Shouldn't happen */
-}
-
-/*extern __inline__*/ int find_next_zero_bit(void *add, int last_bit, int nr)
-{
-	int	mask, i;
-	BITFIELD *addr = add;
-#if 0	
-printk("Find next (%x, %x)", addr, nr);
-#endif
-	addr += nr >> 5;
-#if 0	
-printk(" - Pat: %x(%08X)\n", addr, *addr);
-#endif
-	if ((nr & 0x1F) != 0)
-	{ 
-		if (*addr != 0xFFFFFFFF)
-		{ /* At least one more bit available in this longword */
-			for (i = (nr&0x1F);  i < 32;  i++, nr++)
-			{
-				mask = BIT(nr);
-				if ((mask & *addr) == 0)
-				{
-#if 0					
-printk("(1)Bit: %x(%d), Pat: %x(%08x)\n", nr, nr&0x1F, addr, *addr);
-#endif
-					return (nr);
-				}
-			}
-		}
-		addr++;
-		nr = (nr + 0x1F) & ~0x1F;
-	}
-	while (nr < last_bit)
-	{
-		if (*addr != 0xFFFFFFFF)
-		{ /* Contains at least one zero */
-			for (i = 0;  i < 32;  i++, nr++)
-			{
-				mask = BIT(nr);
-				if ((mask & *addr) == 0)
-				{
-#if 0					
-printk("(2)Bit: %x(%d), Pat: %x(%08x)\n", nr, nr&0x1F, addr, *addr);
-#endif
-					return (nr);
-				}
-			}
-		}
-		addr++;
-		nr += 32;
-	}
-	return (nr);  /* Shouldn't happen */
-}
-
-

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov