Commit fcff6bbf authored by Matt Mackall's avatar Matt Mackall Committed by Linus Torvalds

[PATCH] lib/sort: Use generic sort on x86_64

x86_64 wasn't doing anything special in its sort_extable.  Use the generic
lib/extable sort.
Signed-off-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b5d3f322
......@@ -33,26 +33,3 @@ search_extable(const struct exception_table_entry *first,
}
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);
}
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment