Merge Btrfs into fs/btrfs
[linux-2.6] / arch / alpha / mm / extable.c
1 /*
2  * linux/arch/alpha/mm/extable.c
3  */
4
5 #include <linux/module.h>
6 #include <asm/uaccess.h>
7
8 void sort_extable(struct exception_table_entry *start,
9                   struct exception_table_entry *finish)
10 {
11 }
12
13 const struct exception_table_entry *
14 search_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 }