summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2014-05-02 16:28:15 -0700
committerDavid S. Miller <davem@davemloft.net>2014-05-05 15:26:29 -0400
commita278534406ab13e4ecbca8941eb4c104a5971cd7 (patch)
treeb2d689d4499044d6a5cddd3c9a407047cf350ead
parent07064c6e022ba8dc0c86ce12f7851a1de24e04fc (diff)
x86_64: csum_add for x86_64
Add csum_add function for x86_64. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/x86/include/asm/checksum_64.h7
1 files changed, 7 insertions, 0 deletions
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 */