aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include/asm/uaccess_32.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-06-04 15:46:05 +0900
committerPaul Mundt <lethal@linux-sh.org>2012-06-13 10:28:37 +0900
commitcba8df4be3bdf10c86a26c458c5fc2ca978eeb2c (patch)
tree5dd9f6c93efc0588b813febe7d24178fa43d3d8b /arch/sh/include/asm/uaccess_32.h
parent0e100e11bd73be4e28e457cf5ad49a6892d5d1fe (diff)
sh: use the new generic strnlen_user() function
This discards both the _32 and _64 versions in favour of the consolidated generic one. 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.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/arch/sh/include/asm/uaccess_32.h b/arch/sh/include/asm/uaccess_32.h
index ef44d05bb631..c0de7ee35ab7 100644
--- a/arch/sh/include/asm/uaccess_32.h
+++ b/arch/sh/include/asm/uaccess_32.h
@@ -170,40 +170,4 @@ __asm__ __volatile__( \
extern void __put_user_unknown(void);
-/*
- * Return the size of a string (including the ending 0 even when we have
- * exceeded the maximum string length).
- */
-static inline long __strnlen_user(const char __user *__s, long __n)
-{
- unsigned long res;
- unsigned long __dummy;
-
- __asm__ __volatile__(
- "1:\t"
- "mov.b @(%0,%3), %1\n\t"
- "cmp/eq %4, %0\n\t"
- "bt/s 2f\n\t"
- " add #1, %0\n\t"
- "tst %1, %1\n\t"
- "bf 1b\n\t"
- "2:\n"
- ".section .fixup,\"ax\"\n"
- "3:\n\t"
- "mov.l 4f, %1\n\t"
- "jmp @%1\n\t"
- " mov #0, %0\n"
- ".balign 4\n"
- "4: .long 2b\n"
- ".previous\n"
- ".section __ex_table,\"a\"\n"
- " .balign 4\n"
- " .long 1b,3b\n"
- ".previous"
- : "=z" (res), "=&r" (__dummy)
- : "0" (0), "r" (__s), "r" (__n)
- : "t");
- return res;
-}
-
#endif /* __ASM_SH_UACCESS_32_H */