diff options
author | LEROY Christophe <christophe.leroy@c-s.fr> | 2015-05-19 17:18:55 +0200 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-08-08 05:59:19 +0200 |
commit | 92c985f1d76c228abe202cb3004f03c9b45860d1 (patch) | |
tree | 804abef3839a59c6a2ceae1f9d29702944189b03 /arch/powerpc/lib/checksum_32.S | |
parent | powerpc/85xx: Use kconfig fragments (diff) | |
download | linux-92c985f1d76c228abe202cb3004f03c9b45860d1.tar.xz linux-92c985f1d76c228abe202cb3004f03c9b45860d1.zip |
powerpc: put csum_tcpudp_magic inline
csum_tcpudp_magic() is only a few instructions, and does modify
really few registers. So it is not worth having it as a separate
function and suffer function branching and saving of volatile
registers.
This patch makes it inline by use of the already existing
csum_tcpudp_nofold() function.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc/lib/checksum_32.S')
-rw-r--r-- | arch/powerpc/lib/checksum_32.S | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/powerpc/lib/checksum_32.S b/arch/powerpc/lib/checksum_32.S index 7874e8a80455..6d67e057f15e 100644 --- a/arch/powerpc/lib/checksum_32.S +++ b/arch/powerpc/lib/checksum_32.S @@ -41,22 +41,6 @@ _GLOBAL(ip_fast_csum) blr /* - * Compute checksum of TCP or UDP pseudo-header: - * csum_tcpudp_magic(saddr, daddr, len, proto, sum) - */ -_GLOBAL(csum_tcpudp_magic) - rlwimi r5,r6,16,0,15 /* put proto in upper half of len */ - addc r0,r3,r4 /* add 4 32-bit words together */ - adde r0,r0,r5 - adde r0,r0,r7 - addze r0,r0 /* add in final carry */ - rlwinm r3,r0,16,0,31 /* fold two halves together */ - add r3,r0,r3 - not r3,r3 - srwi r3,r3,16 - blr - -/* * computes the checksum of a memory block at buff, length len, * and adds in "sum" (32-bit) * |