]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - arch/arc/mm/extable.c
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112...
[mirror_ubuntu-artful-kernel.git] / arch / arc / mm / extable.c
CommitLineData
43697cb0
VG
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
9ce6dbe8
PG
11#include <linux/export.h>
12#include <linux/extable.h>
43697cb0
VG
13#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
955ad595 31long arc_copy_from_user_noinline(void *to, const void __user *from,
43697cb0
VG
32 unsigned long n)
33{
34 return __arc_copy_from_user(to, from, n);
35}
36EXPORT_SYMBOL(arc_copy_from_user_noinline);
37
38long arc_copy_to_user_noinline(void __user *to, const void *from,
39 unsigned long n)
40{
41 return __arc_copy_to_user(to, from, n);
42}
43EXPORT_SYMBOL(arc_copy_to_user_noinline);
44
45unsigned long arc_clear_user_noinline(void __user *to,
46 unsigned long n)
47{
48 return __arc_clear_user(to, n);
49}
50EXPORT_SYMBOL(arc_clear_user_noinline);
51
955ad595 52long arc_strncpy_from_user_noinline(char *dst, const char __user *src,
43697cb0
VG
53 long count)
54{
55 return __arc_strncpy_from_user(dst, src, count);
56}
57EXPORT_SYMBOL(arc_strncpy_from_user_noinline);
58
59long arc_strnlen_user_noinline(const char __user *src, long n)
60{
61 return __arc_strnlen_user(src, n);
62}
63EXPORT_SYMBOL(arc_strnlen_user_noinline);
64#endif