extable.c 815 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * linux/arch/alpha/mm/extable.c
  3. */
  4. #include <linux/module.h>
  5. #include <asm/uaccess.h>
  6. void sort_extable(struct exception_table_entry *start,
  7. struct exception_table_entry *finish)
  8. {
  9. }
  10. const struct exception_table_entry *
  11. search_extable(const struct exception_table_entry *first,
  12. const struct exception_table_entry *last,
  13. unsigned long value)
  14. {
  15. while (first <= last) {
  16. const struct exception_table_entry *mid;
  17. unsigned long mid_value;
  18. mid = (last - first) / 2 + first;
  19. mid_value = (unsigned long)&mid->insn + mid->insn;
  20. if (mid_value == value)
  21. return mid;
  22. else if (mid_value < value)
  23. first = mid+1;
  24. else
  25. last = mid-1;
  26. }
  27. return NULL;
  28. }