blob: b06b09ddf924387118384d9fb8a395c83fa3321d [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001// SPDX-License-Identifier: GPL-2.0-only
Vineet Gupta43697cb2013-01-18 15:12:16 +05302/*
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
4 *
Vineet Gupta43697cb2013-01-18 15:12:16 +05305 * Borrowed heavily from MIPS
6 */
7
Paul Gortmaker9ce6dbe2017-01-10 14:13:29 -05008#include <linux/export.h>
9#include <linux/extable.h>
Vineet Gupta43697cb2013-01-18 15:12:16 +053010#include <linux/uaccess.h>
11
12int fixup_exception(struct pt_regs *regs)
13{
14 const struct exception_table_entry *fixup;
15
16 fixup = search_exception_tables(instruction_pointer(regs));
17 if (fixup) {
18 regs->ret = fixup->fixup;
19
20 return 1;
21 }
22
23 return 0;
24}
25
26#ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
27
Vineet Gupta43697cb2013-01-18 15:12:16 +053028unsigned long arc_clear_user_noinline(void __user *to,
29 unsigned long n)
30{
31 return __arc_clear_user(to, n);
32}
33EXPORT_SYMBOL(arc_clear_user_noinline);
34
Sachin Kamat955ad592013-03-06 16:53:45 +053035long arc_strncpy_from_user_noinline(char *dst, const char __user *src,
Vineet Gupta43697cb2013-01-18 15:12:16 +053036 long count)
37{
38 return __arc_strncpy_from_user(dst, src, count);
39}
40EXPORT_SYMBOL(arc_strncpy_from_user_noinline);
41
42long arc_strnlen_user_noinline(const char __user *src, long n)
43{
44 return __arc_strnlen_user(src, n);
45}
46EXPORT_SYMBOL(arc_strnlen_user_noinline);
47#endif