patch-2.1.53 linux/arch/ppc/mm/extable.c

Next file: linux/arch/ppc/mm/fault.c
Previous file: linux/arch/ppc/kernel/time.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.52/linux/arch/ppc/mm/extable.c linux/arch/ppc/mm/extable.c
@@ -16,10 +16,17 @@
 		 const struct exception_table_entry *last,
 		 unsigned long value)
 {
+	const struct exception_table_entry *mid;
+	for ( mid = first; mid < last; mid++)
+	{
+		if ( mid->insn == value )
+			return mid->fixup;
+	}
+	return 0;
+#if 0	
         while (first <= last) {
 		const struct exception_table_entry *mid;
 		long diff;
-
 		mid = (last - first) / 2 + first;
 		diff = mid->insn - value;
                 if (diff == 0)
@@ -29,6 +36,7 @@
                 else
                         last = mid-1;
         }
+#endif	
         return 0;
 }
 

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