diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-01-18 04:42:16 -0500 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-02-11 09:30:31 -0500 |
commit | 43697cb0973da144156e7d11ddd035aee226ee30 (patch) | |
tree | 8c2d6bd2541e536ccd5d04dc2e1b0c7dd5adb66a /arch/arc/mm/extable.c | |
parent | 10a6007bda48e3524e24ce1ad46dc7be1add6a0e (diff) |
ARC: uaccess friends
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/mm/extable.c')
-rw-r--r-- | arch/arc/mm/extable.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/arc/mm/extable.c b/arch/arc/mm/extable.c new file mode 100644 index 000000000000..014172ba8432 --- /dev/null +++ b/arch/arc/mm/extable.c | |||
@@ -0,0 +1,63 @@ | |||
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 | |||
11 | #include <linux/module.h> | ||
12 | #include <linux/uaccess.h> | ||
13 | |||
14 | int fixup_exception(struct pt_regs *regs) | ||
15 | { | ||
16 | const struct exception_table_entry *fixup; | ||
17 | |||
18 | fixup = search_exception_tables(instruction_pointer(regs)); | ||
19 | if (fixup) { | ||
20 | regs->ret = fixup->fixup; | ||
21 | |||
22 | return 1; | ||
23 | } | ||
24 | |||
25 | return 0; | ||
26 | } | ||
27 | |||
28 | #ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE | ||
29 | |||
30 | long arc_copy_from_user_noinline(void *to, const void __user * from, | ||
31 | unsigned long n) | ||
32 | { | ||
33 | return __arc_copy_from_user(to, from, n); | ||
34 | } | ||
35 | EXPORT_SYMBOL(arc_copy_from_user_noinline); | ||
36 | |||
37 | long arc_copy_to_user_noinline(void __user *to, const void *from, | ||
38 | unsigned long n) | ||
39 | { | ||
40 | return __arc_copy_to_user(to, from, n); | ||
41 | } | ||
42 | EXPORT_SYMBOL(arc_copy_to_user_noinline); | ||
43 | |||
44 | unsigned long arc_clear_user_noinline(void __user *to, | ||
45 | unsigned long n) | ||
46 | { | ||
47 | return __arc_clear_user(to, n); | ||
48 | } | ||
49 | EXPORT_SYMBOL(arc_clear_user_noinline); | ||
50 | |||
51 | long arc_strncpy_from_user_noinline (char *dst, const char __user *src, | ||
52 | long count) | ||
53 | { | ||
54 | return __arc_strncpy_from_user(dst, src, count); | ||
55 | } | ||
56 | EXPORT_SYMBOL(arc_strncpy_from_user_noinline); | ||
57 | |||
58 | long arc_strnlen_user_noinline(const char __user *src, long n) | ||
59 | { | ||
60 | return __arc_strnlen_user(src, n); | ||
61 | } | ||
62 | EXPORT_SYMBOL(arc_strnlen_user_noinline); | ||
63 | #endif | ||