···11+/*22+ * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)33+ *44+ * This program is free software; you can redistribute it and/or modify55+ * it under the terms of the GNU General Public License version 2 as66+ * published by the Free Software Foundation.77+ */88+99+#ifndef __ASMARC_SEGMENT_H1010+#define __ASMARC_SEGMENT_H1111+1212+#ifndef __ASSEMBLY__1313+1414+typedef unsigned long mm_segment_t;1515+1616+#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })1717+1818+#define KERNEL_DS MAKE_MM_SEG(0)1919+#define USER_DS MAKE_MM_SEG(TASK_SIZE)2020+2121+#define segment_eq(a, b) ((a) == (b))2222+2323+#endif /* __ASSEMBLY__ */2424+#endif /* __ASMARC_SEGMENT_H */
···11+/*22+ * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)33+ *44+ * This program is free software; you can redistribute it and/or modify55+ * it under the terms of the GNU General Public License version 2 as66+ * published by the Free Software Foundation.77+ *88+ * Borrowed heavily from MIPS99+ */1010+1111+#include <linux/module.h>1212+#include <linux/uaccess.h>1313+1414+int fixup_exception(struct pt_regs *regs)1515+{1616+ const struct exception_table_entry *fixup;1717+1818+ fixup = search_exception_tables(instruction_pointer(regs));1919+ if (fixup) {2020+ regs->ret = fixup->fixup;2121+2222+ return 1;2323+ }2424+2525+ return 0;2626+}2727+2828+#ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE2929+3030+long arc_copy_from_user_noinline(void *to, const void __user * from,3131+ unsigned long n)3232+{3333+ return __arc_copy_from_user(to, from, n);3434+}3535+EXPORT_SYMBOL(arc_copy_from_user_noinline);3636+3737+long arc_copy_to_user_noinline(void __user *to, const void *from,3838+ unsigned long n)3939+{4040+ return __arc_copy_to_user(to, from, n);4141+}4242+EXPORT_SYMBOL(arc_copy_to_user_noinline);4343+4444+unsigned long arc_clear_user_noinline(void __user *to,4545+ unsigned long n)4646+{4747+ return __arc_clear_user(to, n);4848+}4949+EXPORT_SYMBOL(arc_clear_user_noinline);5050+5151+long arc_strncpy_from_user_noinline (char *dst, const char __user *src,5252+ long count)5353+{5454+ return __arc_strncpy_from_user(dst, src, count);5555+}5656+EXPORT_SYMBOL(arc_strncpy_from_user_noinline);5757+5858+long arc_strnlen_user_noinline(const char __user *src, long n)5959+{6060+ return __arc_strnlen_user(src, n);6161+}6262+EXPORT_SYMBOL(arc_strnlen_user_noinline);6363+#endif