Files
android_kernel_xiaomi_sm8450/arch/arm/kernel
Will Deacon 8c56cc8be5 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 <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-07-09 17:41:11 +01:00
..
2008-08-12 19:54:09 +01:00
2008-05-30 10:33:49 +02:00
2012-03-28 18:30:01 +01:00
2012-03-24 09:38:56 +00:00
2010-10-29 13:14:40 -05:00
2012-05-08 12:35:06 +02:00
2012-06-01 12:58:52 -04:00
2012-05-21 14:39:44 -04:00
2012-03-28 18:30:01 +01:00
2012-05-31 17:49:29 -07:00
2012-03-28 18:30:01 +01:00