extable.c 659 B

1234567891011121314151617181920212223242526272829303132333435
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  4. *
  5. * Borrowed heavily from MIPS
  6. */
  7. #include <linux/export.h>
  8. #include <linux/extable.h>
  9. #include <linux/uaccess.h>
  10. int fixup_exception(struct pt_regs *regs)
  11. {
  12. const struct exception_table_entry *fixup;
  13. fixup = search_exception_tables(instruction_pointer(regs));
  14. if (fixup) {
  15. regs->ret = fixup->fixup;
  16. return 1;
  17. }
  18. return 0;
  19. }
  20. #ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
  21. unsigned long arc_clear_user_noinline(void __user *to,
  22. unsigned long n)
  23. {
  24. return __arc_clear_user(to, n);
  25. }
  26. EXPORT_SYMBOL(arc_clear_user_noinline);
  27. #endif