blob: dc7aeda157734737f71d8a0b7dd3a7bfc7fbbcab [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/arch/alpha/mm/extable.c
3 */
4
Linus Torvalds1da177e2005-04-16 15:20:36 -07005#include <linux/module.h>
6#include <asm/uaccess.h>
7
8void sort_extable(struct exception_table_entry *start,
9 struct exception_table_entry *finish)
10{
11}
12
13const struct exception_table_entry *
14search_extable(const struct exception_table_entry *first,
15 const struct exception_table_entry *last,
16 unsigned long value)
17{
18 while (first <= last) {
19 const struct exception_table_entry *mid;
20 unsigned long mid_value;
21
22 mid = (last - first) / 2 + first;
23 mid_value = (unsigned long)&mid->insn + mid->insn;
24 if (mid_value == value)
25 return mid;
26 else if (mid_value < value)
27 first = mid+1;
28 else
29 last = mid-1;
30 }
31
32 return NULL;
33}