WIP FPC-III support
[linux/fpc-iii.git] / arch / arc / mm / extable.c
blobb06b09ddf924387118384d9fb8a395c83fa3321d
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
5 * Borrowed heavily from MIPS
6 */
8 #include <linux/export.h>
9 #include <linux/extable.h>
10 #include <linux/uaccess.h>
12 int fixup_exception(struct pt_regs *regs)
14 const struct exception_table_entry *fixup;
16 fixup = search_exception_tables(instruction_pointer(regs));
17 if (fixup) {
18 regs->ret = fixup->fixup;
20 return 1;
23 return 0;
26 #ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
28 unsigned long arc_clear_user_noinline(void __user *to,
29 unsigned long n)
31 return __arc_clear_user(to, n);
33 EXPORT_SYMBOL(arc_clear_user_noinline);
35 long arc_strncpy_from_user_noinline(char *dst, const char __user *src,
36 long count)
38 return __arc_strncpy_from_user(dst, src, count);
40 EXPORT_SYMBOL(arc_strncpy_from_user_noinline);
42 long arc_strnlen_user_noinline(const char __user *src, long n)
44 return __arc_strnlen_user(src, n);
46 EXPORT_SYMBOL(arc_strnlen_user_noinline);
47 #endif