/usr/src/linux-headers-5.15.0-181/arch/arc/include/asm
NameSizeModeActions
arcregs.h94770644editdlrm
asm-offsets.h1650644editdlrm
asserts.h9580644editdlrm
atomic-llsc.h28640644editdlrm
atomic-spinlock.h25690644editdlrm
atomic.h11530644editdlrm
atomic64-arcv2.h60950644editdlrm
barrier.h13760644editdlrm
bitops.h38850644editdlrm
bug.h8190644editdlrm
cache.h36040644editdlrm
cacheflush.h38240644editdlrm
checksum.h23710644editdlrm
cmpxchg.h31880644editdlrm
current.h5490644editdlrm
delay.h18960644editdlrm
disasm.h38130644editdlrm
dma.h3130644editdlrm
dsp-impl.h38600644editdlrm
dsp.h7960644editdlrm
dwarf.h7460644editdlrm
elf.h19350644editdlrm
entry-arcv2.h74190644editdlrm
entry-compact.h88100644editdlrm
entry.h66870644editdlrm
exec.h2640644editdlrm
fb.h4110644editdlrm
fpu.h11250644editdlrm
futex.h36110644editdlrm
highmem.h14220644editdlrm
hugepage.h20710644editdlrm
io.h62910644editdlrm
irq.h6790644editdlrm
irqflags-arcv2.h34910644editdlrm
irqflags-compact.h42930644editdlrm
irqflags.h3630644editdlrm
jump_label.h19760644editdlrm
Kbuild1530644editdlrm
kdebug.h2540644editdlrm
kgdb.h12390644editdlrm
kprobes.h11860644editdlrm
linkage.h14840644editdlrm
mach_desc.h19430644editdlrm
mmu-arcv2.h24940644editdlrm
mmu.h3870644editdlrm
mmu_context.h55680644editdlrm
module.h4280644editdlrm
page.h33130644editdlrm
pci.h3600644editdlrm
perf_event.h68790644editdlrm
pgalloc.h28880644editdlrm
pgtable-bits-arcv2.h48960644editdlrm
pgtable-levels.h56260644editdlrm
pgtable.h7800644editdlrm
processor.h32530644editdlrm
ptrace.h37590644editdlrm
sections.h2610644editdlrm
segment.h4760644editdlrm
serial.h4980644editdlrm
setup.h12740644editdlrm
shmparam.h2960644editdlrm
smp.h38230644editdlrm
spinlock.h85800644editdlrm
spinlock_types.h9050644editdlrm
stacktrace.h11780644editdlrm
string.h10360644editdlrm
switch_to.h5530644editdlrm
syscall.h17380644editdlrm
syscalls.h5470644editdlrm
thread_info.h33390644editdlrm
timex.h3620644editdlrm
tlb.h2620644editdlrm
tlbflush.h16540644editdlrm
uaccess.h170190644editdlrm
unaligned.h6250644editdlrm
unwind.h34460644editdlrm
vermagic.h1570644editdlrm
vmalloc.h870644editdlrm
Edit: /usr/src/linux-headers-5.15.0-181/arch/arc/include/asm/checksum.h (2371B)
/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) * * Joern Rennecke : Jan 2012 * -Insn Scheduling improvements to csum core routines. * = csum_fold( ) largely derived from ARM version. * = ip_fast_cum( ) to have module scheduling * -gcc 4.4.x broke networking. Alias analysis needed to be primed. * worked around by adding memory clobber to ip_fast_csum( ) * * vineetg: May 2010 * -Rewrote ip_fast_cscum( ) and csum_fold( ) with fast inline asm */ #ifndef _ASM_ARC_CHECKSUM_H #define _ASM_ARC_CHECKSUM_H /* * Fold a partial checksum * * The 2 swords comprising the 32bit sum are added, any carry to 16th bit * added back and final sword result inverted. */ static inline __sum16 csum_fold(__wsum s) { unsigned int r = s << 16 | s >> 16; /* ror */ s = ~s; s -= r; return s >> 16; } /* * This is a version of ip_compute_csum() optimized for IP headers, * which always checksum on 4 octet boundaries. */ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) { const void *ptr = iph; unsigned int tmp, tmp2, sum; __asm__( " ld.ab %0, [%3, 4] \n" " ld.ab %2, [%3, 4] \n" " sub %1, %4, 2 \n" " lsr.f lp_count, %1, 1 \n" " bcc 0f \n" " add.f %0, %0, %2 \n" " ld.ab %2, [%3, 4] \n" "0: lp 1f \n" " ld.ab %1, [%3, 4] \n" " adc.f %0, %0, %2 \n" " ld.ab %2, [%3, 4] \n" " adc.f %0, %0, %1 \n" "1: adc.f %0, %0, %2 \n" " add.cs %0,%0,1 \n" : "=&r"(sum), "=r"(tmp), "=&r"(tmp2), "+&r" (ptr) : "r"(ihl) : "cc", "lp_count", "memory"); return csum_fold(sum); } /* * TCP pseudo Header is 12 bytes: * SA [4], DA [4], zeroes [1], Proto[1], TCP Seg(hdr+data) Len [2] */ static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, __u8 proto, __wsum sum) { __asm__ __volatile__( " add.f %0, %0, %1 \n" " adc.f %0, %0, %2 \n" " adc.f %0, %0, %3 \n" " adc.f %0, %0, %4 \n" " adc %0, %0, 0 \n" : "+&r"(sum) : "r"(saddr), "r"(daddr), #ifdef CONFIG_CPU_BIG_ENDIAN "r"(len), #else "r"(len << 8), #endif "r"(htons(proto)) : "cc"); return sum; } #define csum_fold csum_fold #define ip_fast_csum ip_fast_csum #define csum_tcpudp_nofold csum_tcpudp_nofold #include #endif /* _ASM_ARC_CHECKSUM_H */