From: Tom Herbert Date: Fri, 2 May 2014 23:28:15 +0000 (-0700) Subject: x86_64: csum_add for x86_64 X-Git-Tag: android-x86-4.4-r2~1003^2~278^2~6 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a278534406ab13e4ecbca8941eb4c104a5971cd7;p=android-x86%2Fkernel.git x86_64: csum_add for x86_64 Add csum_add function for x86_64. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller --- diff --git a/arch/x86/include/asm/checksum_64.h b/arch/x86/include/asm/checksum_64.h index e6fd8a026c7b..3581761bd86c 100644 --- a/arch/x86/include/asm/checksum_64.h +++ b/arch/x86/include/asm/checksum_64.h @@ -188,4 +188,11 @@ static inline unsigned add32_with_carry(unsigned a, unsigned b) return a; } +#define HAVE_ARCH_CSUM_ADD +static inline __wsum csum_add(__wsum csum, __wsum addend) +{ + return (__force __wsum)add32_with_carry((__force unsigned)csum, + (__force unsigned)addend); +} + #endif /* _ASM_X86_CHECKSUM_64_H */