extable.c 841 B

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