]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: memcpy optimization for 64bit LE
authorPhilippe Bergheaud <felix@linux.vnet.ibm.com>
Tue, 29 Apr 2014 23:12:01 +0000 (09:12 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 30 Apr 2014 05:26:18 +0000 (15:26 +1000)
commit1e61bf73d088f944fb81f3ca841fb5c9e8842304
tree77a9ff9bfbb32f75a18a7f3032ad7d3d55944c48
parent0127493c14a5e398489c698c0324da8fca0e3705
powerpc: memcpy optimization for 64bit LE

Unaligned stores take alignment exceptions on POWER7 running in little-endian.
This is a dumb little-endian base memcpy that prevents unaligned stores.
Once booted the feature fixup code switches over to the VMX copy loops
(which are already endian safe).

The question is what we do before that switch over. The base 64bit
memcpy takes alignment exceptions on POWER7 so we can't use it as is.
Fixing the causes of alignment exception would slow it down, because
we'd need to ensure all loads and stores are aligned either through
rotate tricks or bytewise loads and stores. Either would be bad for
all other 64bit platforms.

[ I simplified the loop a bit - Anton ]

Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/string.h
arch/powerpc/kernel/ppc_ksyms.c
arch/powerpc/lib/Makefile
arch/powerpc/lib/memcpy_64.S