extable.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * Borrowed heavily from MIPS
  9. */
  10. #include <linux/export.h>
  11. #include <linux/extable.h>
  12. #include <linux/uaccess.h>
  13. int fixup_exception(struct pt_regs *regs)
  14. {
  15. const struct exception_table_entry *fixup;
  16. fixup = search_exception_tables(instruction_pointer(regs));
  17. if (fixup) {
  18. regs->ret = fixup->fixup;
  19. return 1;
  20. }
  21. return 0;
  22. }
  23. #ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
  24. unsigned long arc_clear_user_noinline(void __user *to,
  25. unsigned long n)
  26. {
  27. return __arc_clear_user(to, n);
  28. }
  29. EXPORT_SYMBOL(arc_clear_user_noinline);
  30. long arc_strncpy_from_user_noinline(char *dst, const char __user *src,
  31. long count)
  32. {
  33. return __arc_strncpy_from_user(dst, src, count);
  34. }
  35. EXPORT_SYMBOL(arc_strncpy_from_user_noinline);
  36. long arc_strnlen_user_noinline(const char __user *src, long n)
  37. {
  38. return __arc_strnlen_user(src, n);
  39. }
  40. EXPORT_SYMBOL(arc_strnlen_user_noinline);
  41. #endif