2 * linux/arch/unicore32/include/asm/checksum.h
4 * Code specific to PKUnity SoC and UniCore ISA
6 * Copyright (C) 2001-2010 GUAN Xue-tao
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 * IP checksum routines
14 #ifndef __UNICORE_CHECKSUM_H__
15 #define __UNICORE_CHECKSUM_H__
18 * computes the checksum of the TCP/UDP pseudo-header
19 * returns a 16-bit checksum, already complemented
23 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len,
24 __u8 proto, __wsum sum)
29 "addc.a %0, %0, %4 << #8\n"
33 : "r" (sum), "r" (daddr), "r" (saddr), "r" (len), "Ir" (htons(proto))
37 #define csum_tcpudp_nofold csum_tcpudp_nofold
39 #include <asm-generic/checksum.h>