blob: 72125a34e78046d73f755891bd1d1629fd4d823c [file] [log] [blame]
Vineet Gupta43697cb2013-01-18 15:12:16 +05301/*
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
Paul Gortmaker9ce6dbe2017-01-10 14:13:29 -050011#include <linux/export.h>
12#include <linux/extable.h>
Vineet Gupta43697cb2013-01-18 15:12:16 +053013#include <linux/uaccess.h>
14
15int fixup_exception(struct pt_regs *regs)
16{
17 const struct exception_table_entry *fixup;
18
19 fixup = search_exception_tables(instruction_pointer(regs));
20 if (fixup) {
21 regs->ret = fixup->fixup;
22
23 return 1;
24 }
25
26 return 0;
27}
28
29#ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
30
Vineet Gupta43697cb2013-01-18 15:12:16 +053031unsigned long arc_clear_user_noinline(void __user *to,
32 unsigned long n)
33{
34 return __arc_clear_user(to, n);
35}
36EXPORT_SYMBOL(arc_clear_user_noinline);
37
Sachin Kamat955ad592013-03-06 16:53:45 +053038long arc_strncpy_from_user_noinline(char *dst, const char __user *src,
Vineet Gupta43697cb2013-01-18 15:12:16 +053039 long count)
40{
41 return __arc_strncpy_from_user(dst, src, count);
42}
43EXPORT_SYMBOL(arc_strncpy_from_user_noinline);
44
45long arc_strnlen_user_noinline(const char __user *src, long n)
46{
47 return __arc_strnlen_user(src, n);
48}
49EXPORT_SYMBOL(arc_strnlen_user_noinline);
50#endif