summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib/checksum_32.S
diff options
context:
space:
mode:
authorLEROY Christophe <christophe.leroy@c-s.fr>2015-05-19 17:18:55 +0200
committerScott Wood <scottwood@freescale.com>2015-08-07 22:59:19 -0500
commit92c985f1d76c228abe202cb3004f03c9b45860d1 (patch)
tree804abef3839a59c6a2ceae1f9d29702944189b03 /arch/powerpc/lib/checksum_32.S
parent44d5401425db90dc46a0ca000bdc41429768d351 (diff)
downloadop-kernel-dev-92c985f1d76c228abe202cb3004f03c9b45860d1.zip
op-kernel-dev-92c985f1d76c228abe202cb3004f03c9b45860d1.tar.gz
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.S16
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/powerpc/lib/checksum_32.S b/arch/powerpc/lib/checksum_32.S
index 7874e8a..6d67e05 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)
*
OpenPOWER on IntegriCloud