Skip to content

Commit

Permalink
[IA64] fix csum_ipv6_magic()
Browse files Browse the repository at this point in the history
The 32-bit parameters (len and csum) of csum_ipv6_magic() are passed in 64-bit
registers in2 and in4. The high order 32 bits of the registers were never
cleared, and garbage was sometimes calculated into the checksum.

Fix this by clearing the high order 32 bits of these registers.

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Jiri Bohac authored and Tony Luck committed Sep 2, 2009
1 parent f2486f2 commit 5afe18d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions arch/ia64/lib/ip_fast_csum.S
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,22 @@ END(ip_fast_csum)
GLOBAL_ENTRY(csum_ipv6_magic)
ld4 r20=[in0],4
ld4 r21=[in1],4
dep r15=in3,in2,32,16
zxt4 in2=in2
;;
ld4 r22=[in0],4
ld4 r23=[in1],4
mux1 r15=r15,@rev
dep r15=in3,in2,32,16
;;
ld4 r24=[in0],4
ld4 r25=[in1],4
shr.u r15=r15,16
mux1 r15=r15,@rev
add r16=r20,r21
add r17=r22,r23
zxt4 in4=in4
;;
ld4 r26=[in0],4
ld4 r27=[in1],4
shr.u r15=r15,16
add r18=r24,r25
add r8=r16,r17
;;
Expand Down

0 comments on commit 5afe18d

Please sign in to comment.