mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 23:55:36 +07:00
4301785c7c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
20 lines
361 B
C
20 lines
361 B
C
/*
|
|
* Licensed under the GPL
|
|
*/
|
|
|
|
#ifndef __UM_SYSDEP_CHECKSUM_H
|
|
#define __UM_SYSDEP_CHECKSUM_H
|
|
|
|
static inline unsigned add32_with_carry(unsigned a, unsigned b)
|
|
{
|
|
asm("addl %2,%0\n\t"
|
|
"adcl $0,%0"
|
|
: "=r" (a)
|
|
: "0" (a), "r" (b));
|
|
return a;
|
|
}
|
|
|
|
extern __sum16 ip_compute_csum(const void *buff, int len);
|
|
|
|
#endif
|