From: Will Deacon Date: Fri, 6 Jul 2012 14:45:39 +0000 (+0100) Subject: ARM: 7449/1: use generic strnlen_user and strncpy_from_user functions X-Git-Tag: v3.6-rc1~70^2^5~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c56cc8be5b38e3684eba96dc9b3f7ca7e495755;p=pandora-kernel.git ARM: 7449/1: use generic strnlen_user and strncpy_from_user functions This patch implements the word-at-a-time interface for ARM using the same algorithm as x86. We use the fls macro from ARMv5 onwards, where we have a clz instruction available which saves us a mov instruction when targetting Thumb-2. For older CPUs, we use the magic 0x0ff0001 constant. Big-endian configurations make use of the implementation from asm-generic. With this implemented, we can replace our byte-at-a-time strnlen_user and strncpy_from_user functions with the optimised generic versions. Reviewed-by: Nicolas Pitre Signed-off-by: Will Deacon Signed-off-by: Russell King --- Reading git-diff-tree failed