1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/unicore32/include/asm/checksum.h
5 * Code specific to PKUnity SoC and UniCore ISA
7 * Copyright (C) 2001-2010 GUAN Xue-tao
11 #ifndef __UNICORE_CHECKSUM_H__
12 #define __UNICORE_CHECKSUM_H__
15 * computes the checksum of the TCP/UDP pseudo-header
16 * returns a 16-bit checksum, already complemented
20 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len,
21 __u8 proto, __wsum sum)
26 "addc.a %0, %0, %4 << #8\n"
30 : "r" (sum), "r" (daddr), "r" (saddr), "r" (len), "Ir" (htons(proto))
34 #define csum_tcpudp_nofold csum_tcpudp_nofold
36 #include <asm-generic/checksum.h>