arm64: dts: Revert "specify console via command line"
[linux/fpc-iii.git] / arch / unicore32 / include / asm / checksum.h
blobe774ca268c15e67ea279af3cf7361f6b5da02b2e
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
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
9 * IP checksum routines
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
19 static inline __wsum
20 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len,
21 __u8 proto, __wsum sum)
23 __asm__(
24 "add.a %0, %1, %2\n"
25 "addc.a %0, %0, %3\n"
26 "addc.a %0, %0, %4 << #8\n"
27 "addc.a %0, %0, %5\n"
28 "addc %0, %0, #0\n"
29 : "=&r"(sum)
30 : "r" (sum), "r" (daddr), "r" (saddr), "r" (len), "Ir" (htons(proto))
31 : "cc");
32 return sum;
34 #define csum_tcpudp_nofold csum_tcpudp_nofold
36 #include <asm-generic/checksum.h>
38 #endif