
From: Matt Mackall <mpm@selenic.com>

x86_64 wasn't doing anything special in its sort_extable.  Use the generic
lib/extable sort.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/x86_64/mm/extable.c     |   23 -----------------------
 25-akpm/include/asm-x86_64/uaccess.h |    1 +
 2 files changed, 1 insertion(+), 23 deletions(-)

diff -puN arch/x86_64/mm/extable.c~lib-sort-use-generic-sort-on-x86_64 arch/x86_64/mm/extable.c
--- 25/arch/x86_64/mm/extable.c~lib-sort-use-generic-sort-on-x86_64	2005-02-02 15:44:12.644322032 -0800
+++ 25-akpm/arch/x86_64/mm/extable.c	2005-02-02 15:44:12.649321272 -0800
@@ -33,26 +33,3 @@ search_extable(const struct exception_ta
         }
         return NULL;
 }
-
-/* When an exception handler is in an non standard section (like __init)
-   the fixup table can end up unordered. Fix that here. */
-void sort_extable(struct exception_table_entry *start,
-		  struct exception_table_entry *finish)
-{
-	struct exception_table_entry *e;
-	int change;
-
-	/* The input is near completely presorted, which makes bubble sort the
-	   best (and simplest) sort algorithm. */
-	do {
-		change = 0;
-		for (e = start+1; e < finish; e++) {
-			if (e->insn < e[-1].insn) {
-				struct exception_table_entry tmp = e[-1];
-				e[-1] = e[0];
-				e[0] = tmp;
-				change = 1;
-			}
-		}
-	} while (change != 0);
-}
diff -puN include/asm-x86_64/uaccess.h~lib-sort-use-generic-sort-on-x86_64 include/asm-x86_64/uaccess.h
--- 25/include/asm-x86_64/uaccess.h~lib-sort-use-generic-sort-on-x86_64	2005-02-02 15:44:12.646321728 -0800
+++ 25-akpm/include/asm-x86_64/uaccess.h	2005-02-02 15:44:12.650321120 -0800
@@ -73,6 +73,7 @@ struct exception_table_entry
 	unsigned long insn, fixup;
 };
 
+#define ARCH_HAS_SEARCH_EXTABLE
 
 /*
  * These are the main single-value transfer routines.  They automatically
_
