linux/arch/sparc
David S. Miller 4efcac3a24 sparc: Optimize strncpy_from_user() zero byte search.
Compute a mask that will only have 0x80 in the bytes which
had a zero in them.  The formula is:

	~(((x & 0x7f7f7f7f) + 0x7f7f7f7f) | x | 0x7f7f7f7f)

In the inner word iteration, we have to compute the "x | 0x7f7f7f7f"
part, so we can reuse that in the above calculation.

Once we have this mask, we perform divide and conquer to find the
highest 0x80 location.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-23 19:20:20 -07:00
..
boot sparc32: drop build time btfixup patching 2012-05-14 14:05:10 -07:00
configs
include/asm sparc: Add full proper error handling to strncpy_from_user(). 2012-05-22 23:32:27 -07:00
kernel Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2012-05-21 20:27:36 -07:00
lib sparc: Optimize strncpy_from_user() zero byte search. 2012-05-23 19:20:20 -07:00
math-emu Disintegrate asm/system.h for Sparc 2012-03-28 18:30:03 +01:00
mm sparc32: use the common implementation of alloc_thread_info_node() 2012-05-22 12:02:56 -07:00
net net: filter: remove unused cpu_off in sparc JIT 2012-04-17 22:55:59 -04:00
oprofile
prom sparc32: drop sun4c support 2012-05-11 19:27:44 -07:00
Kbuild Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next 2012-05-21 10:32:01 -07:00
Kconfig sparc32: use the common implementation of alloc_thread_info_node() 2012-05-22 12:02:56 -07:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-05-21 19:43:57 -07:00