[RFC PATCH 1/2] ARM: use generic strnlen_user and strncpy_from_user functions

Will Deacon will.deacon at arm.com
Tue Jun 12 17:17:39 EDT 2012


On Tue, Jun 12, 2012 at 03:53:56AM +0100, Nicolas Pitre wrote:
> On Fri, 8 Jun 2012, Will Deacon wrote:
> 
> > This patch implements the word-at-a-time interface for ARM using the
> > same algorithm as x86. Although we have a clz instruction from ARMv5,
> > this only saves us one mov instruction when building with Thumb-2 and
> > makes no difference when targetting ARM, so we use the magic 0x0ff0001
> > constant for all CPUs. For big-endian configurations, we use 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.
> > 
> > Signed-off-by: Will Deacon <will.deacon at arm.com>
> 
> With the updated patch comment...
> 
> Reviewed-by: Nicolas Pitre <nico at linaro.org>

Thanks Nicolas. I'll post a v2 with the updated change log and your
reviewed-bys. I may also CC lkml in case somebody over there has some
better benchmarks for this stuff.

Cheers,

Will



More information about the linux-arm-kernel mailing list