extable.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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/module.h>
  11. #include <linux/uaccess.h>
  12. int fixup_exception(struct pt_regs *regs)
  13. {
  14. const struct exception_table_entry *fixup;
  15. fixup = search_exception_tables(instruction_pointer(regs));
  16. if (fixup) {
  17. regs->ret = fixup->fixup;
  18. return 1;
  19. }
  20. return 0;
  21. }
  22. #ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
  23. long arc_copy_from_user_noinline(void *to, const void __user *from,
  24. unsigned long n)
  25. {
  26. return __arc_copy_from_user(to, from, n);
  27. }
  28. EXPORT_SYMBOL(arc_copy_from_user_noinline);
  29. long arc_copy_to_user_noinline(void __user *to, const void *from,
  30. unsigned long n)
  31. {
  32. return __arc_copy_to_user(to, from, n);
  33. }
  34. EXPORT_SYMBOL(arc_copy_to_user_noinline);
  35. unsigned long arc_clear_user_noinline(void __user *to,
  36. unsigned long n)
  37. {
  38. return __arc_clear_user(to, n);
  39. }
  40. EXPORT_SYMBOL(arc_clear_user_noinline);
  41. long arc_strncpy_from_user_noinline(char *dst, const char __user *src,
  42. long count)
  43. {
  44. return __arc_strncpy_from_user(dst, src, count);
  45. }
  46. EXPORT_SYMBOL(arc_strncpy_from_user_noinline);
  47. long arc_strnlen_user_noinline(const char __user *src, long n)
  48. {
  49. return __arc_strnlen_user(src, n);
  50. }
  51. EXPORT_SYMBOL(arc_strnlen_user_noinline);
  52. #endif