summaryrefslogtreecommitdiff
path: root/arch/sh/include/asm/uaccess_32.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-05-25 08:02:48 +0400
committerPaul Mundt <lethal@linux-sh.org>2012-06-13 05:28:16 +0400
commit0e100e11bd73be4e28e457cf5ad49a6892d5d1fe (patch)
tree55e193c2f37f458bd51d363bac78e20897c86b49 /arch/sh/include/asm/uaccess_32.h
parent94fa83c424321189ca24fb6cb4c0d224cdedc72d (diff)
downloadlinux-0e100e11bd73be4e28e457cf5ad49a6892d5d1fe.tar.xz
sh: switch to generic strncpy_from_user().
This kills off the special sh32/64 versions and adopts the generic version. It should be possible to optimize this for SH-4A unaligned loads, but this is a corner case that can be supported incrementally. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/uaccess_32.h')
-rw-r--r--arch/sh/include/asm/uaccess_32.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/arch/sh/include/asm/uaccess_32.h b/arch/sh/include/asm/uaccess_32.h
index ae0d24f6653f..ef44d05bb631 100644
--- a/arch/sh/include/asm/uaccess_32.h
+++ b/arch/sh/include/asm/uaccess_32.h
@@ -170,45 +170,6 @@ __asm__ __volatile__( \
extern void __put_user_unknown(void);
-static inline int
-__strncpy_from_user(unsigned long __dest, unsigned long __user __src, int __count)
-{
- __kernel_size_t res;
- unsigned long __dummy, _d, _s, _c;
-
- __asm__ __volatile__(
- "9:\n"
- "mov.b @%2+, %1\n\t"
- "cmp/eq #0, %1\n\t"
- "bt/s 2f\n"
- "1:\n"
- "mov.b %1, @%3\n\t"
- "dt %4\n\t"
- "bf/s 9b\n\t"
- " add #1, %3\n\t"
- "2:\n\t"
- "sub %4, %0\n"
- "3:\n"
- ".section .fixup,\"ax\"\n"
- "4:\n\t"
- "mov.l 5f, %1\n\t"
- "jmp @%1\n\t"
- " mov %9, %0\n\t"
- ".balign 4\n"
- "5: .long 3b\n"
- ".previous\n"
- ".section __ex_table,\"a\"\n"
- " .balign 4\n"
- " .long 9b,4b\n"
- ".previous"
- : "=r" (res), "=&z" (__dummy), "=r" (_s), "=r" (_d), "=r"(_c)
- : "0" (__count), "2" (__src), "3" (__dest), "4" (__count),
- "i" (-EFAULT)
- : "memory", "t");
-
- return res;
-}
-
/*
* Return the size of a string (including the ending 0 even when we have
* exceeded the maximum string length).