patch-1.3.48 linux/arch/mips/kernel/ioport.c

Next file: linux/arch/mips/kernel/ipc.c
Previous file: linux/arch/mips/kernel/head.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.47/linux/arch/mips/kernel/ioport.c linux/arch/mips/kernel/ioport.c
@@ -7,50 +7,8 @@
 #include <linux/types.h>
 #include <linux/ioport.h>
 
-#define IOTABLE_SIZE 32
-
-typedef struct resource_entry_t {
-	u_long from, num;
-	const char *name;
-	struct resource_entry_t *next;
-} resource_entry_t;
-
-/* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */
-static void set_bitmap(unsigned long *bitmap, short base, short extent, int new_value)
-{
-	int mask;
-	unsigned long *bitmap_base = bitmap + (base >> 5);
-	unsigned short low_index = base & 0x1f;
-	int length = low_index + extent;
-
-	if (low_index != 0) {
-		mask = (~0 << low_index);
-		if (length < 32)
-				mask &= ~(~0 << length);
-		if (new_value)
-			*bitmap_base++ |= mask;
-		else
-			*bitmap_base++ &= ~mask;
-		length -= 32;
-	}
-
-	mask = (new_value ? ~0 : 0);
-	while (length >= 32) {
-		*bitmap_base++ = mask;
-		length -= 32;
-	}
-
-	if (length > 0) {
-		mask = ~(~0 << length);
-		if (new_value)
-			*bitmap_base++ |= mask;
-		else
-			*bitmap_base++ &= ~mask;
-	}
-}
-
 /*
- * this changes the io permissions bitmap in the current task.
+ * This changes the io permissions bitmap in the current task.
  */
 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
 {
@@ -75,29 +33,4 @@
 	     long eip,long cs,long eflags,long esp,long ss)
 {
 	return -ENOSYS;
-}
-
-/*
- * The workhorse function: find where to put a new entry
- */
-static resource_entry_t *find_gap(resource_entry_t *root,
-				  u_long from, u_long num)
-{
-	unsigned long flags;
-	resource_entry_t *p;
-	
-	if (from > from+num-1)
-		return NULL;
-	save_flags(flags);
-	cli();
-	for (p = root; ; p = p->next) {
-		if ((p != root) && (p->from+p->num-1 >= from)) {
-			p = NULL;
-			break;
-		}
-		if ((p->next == NULL) || (p->next->from > from+num-1))
-			break;
-	}
-	restore_flags(flags);
-	return p;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this