/usr/src/linux-headers-5.15.0-181/arch/arm/include/asm
NameSizeModeActions
hardware/-0755rm
mach/-0755rm
vdso/-0755rm
xen/-0755rm
archrandom.h1920644editdlrm
arch_gicv3.h63270644editdlrm
arch_timer.h31240644editdlrm
arm-cci.h5350644editdlrm
asm-offsets.h350644editdlrm
assembler.h131060644editdlrm
atomic.h125360644editdlrm
auxvec.h290644editdlrm
barrier.h29100644editdlrm
bitops.h76270644editdlrm
bitrev.h4510644editdlrm
bL_switcher.h21860644editdlrm
bug.h26200644editdlrm
bugs.h2970644editdlrm
cache.h7940644editdlrm
cacheflush.h157940644editdlrm
cachetype.h27790644editdlrm
checksum.h40260644editdlrm
clocksource.h1610644editdlrm
cmpxchg.h63280644editdlrm
compiler.h9780644editdlrm
cp15.h33020644editdlrm
cpu.h3870644editdlrm
cpufeature.h12910644editdlrm
cpuidle.h16280644editdlrm
cputype.h87660644editdlrm
cti.h37030644editdlrm
dcc.h6230644editdlrm
delay.h29030644editdlrm
device.h6360644editdlrm
div64.h26400644editdlrm
dma-direct.h13410644editdlrm
dma-iommu.h9080644editdlrm
dma-mapping.h47140644editdlrm
dma.h42870644editdlrm
dmi.h3780644editdlrm
domain.h37510644editdlrm
ecard.h61190644editdlrm
edac.h9950644editdlrm
efi.h25010644editdlrm
elf.h46360644editdlrm
entry-macro-multi.S3360644editdlrm
exception.h4160644editdlrm
fb.h3750644editdlrm
fiq.h13910644editdlrm
firmware.h17280644editdlrm
fixmap.h18810644editdlrm
floppy.h23180644editdlrm
fncpy.h25520644editdlrm
fpstate.h14780644editdlrm
ftrace.h18210644editdlrm
futex.h43570644editdlrm
glue-cache.h35150644editdlrm
glue-df.h21100644editdlrm
glue-pf.h10050644editdlrm
glue-proc.h44240644editdlrm
glue.h6130644editdlrm
gpio.h6150644editdlrm
hardirq.h2460644editdlrm
highmem.h23790644editdlrm
hugetlb-3level.h6900644editdlrm
hugetlb.h5130644editdlrm
hwcap.h3780644editdlrm
hw_breakpoint.h38110644editdlrm
hw_irq.h3490644editdlrm
hypervisor.h2240644editdlrm
ide.h5660644editdlrm
idmap.h3590644editdlrm
insn.h6360644editdlrm
io.h150270644editdlrm
irq.h8870644editdlrm
irqflags.h39690644editdlrm
irq_work.h2340644editdlrm
jump_label.h10090644editdlrm
kasan.h7080644editdlrm
kasan_def.h27260644editdlrm
Kbuild1860644editdlrm
kexec-internal.h2720644editdlrm
kexec.h22550644editdlrm
kgdb.h27830644editdlrm
kprobes.h22480644editdlrm
krait-l2-accessors.h2310644editdlrm
linkage.h2160644editdlrm
mc146818rtc.h7200644editdlrm
mcpm.h120610644editdlrm
mcs_spinlock.h5700644editdlrm
memblock.h2480644editdlrm
memory.h109450644editdlrm
mmu.h9530644editdlrm
mmu_context.h34610644editdlrm
module.h12160644editdlrm
module.lds.h1340644editdlrm
mpu.h33000644editdlrm
mtd-xip.h5200644editdlrm
neon.h10410644editdlrm
nwflash.h1950644editdlrm
opcodes-sec.h3500644editdlrm
opcodes-virt.h6840644editdlrm
opcodes.h81180644editdlrm
outercache.h32680644editdlrm
page-nommu.h8110644editdlrm
page.h34480644editdlrm
paravirt.h4770644editdlrm
patch.h4380644editdlrm
pci.h7940644editdlrm
percpu.h10690644editdlrm
perf_event.h7080644editdlrm
pgalloc.h33730644editdlrm
pgtable-2level-hwdef.h33850644editdlrm
pgtable-2level-types.h12780644editdlrm
pgtable-2level.h86450644editdlrm
pgtable-3level-hwdef.h34350644editdlrm
pgtable-3level-types.h13310644editdlrm
pgtable-3level.h81480644editdlrm
pgtable-hwdef.h3210644editdlrm
pgtable-nommu.h19790644editdlrm
pgtable.h104920644editdlrm
probes.h13320644editdlrm
proc-fns.h47540644editdlrm
processor.h31660644editdlrm
procinfo.h11520644editdlrm
prom.h5520644editdlrm
psci.h3790644editdlrm
ptdump.h9230644editdlrm
ptrace.h48410644editdlrm
seccomp.h2810644editdlrm
sections.h6220644editdlrm
secure_cntvoff.h1520644editdlrm
setup.h7730644editdlrm
set_memory.h7200644editdlrm
shmparam.h4190644editdlrm
signal.h5590644editdlrm
smp.h28390644editdlrm
smp_plat.h25350644editdlrm
smp_scu.h13520644editdlrm
smp_twd.h5900644editdlrm
sparsemem.h7160644editdlrm
spectre.h9060644editdlrm
spinlock.h56450644editdlrm
spinlock_types.h5410644editdlrm
stackprotector.h13570644editdlrm
stacktrace.h7420644editdlrm
string.h21650644editdlrm
suspend.h3690644editdlrm
swab.h10050644editdlrm
switch_to.h10580644editdlrm
sync_bitops.h15140644editdlrm
syscall.h23470644editdlrm
system_info.h7630644editdlrm
system_misc.h10050644editdlrm
tcm.h9250644editdlrm
therm.h6550644editdlrm
thread_info.h49740644editdlrm
thread_notify.h10860644editdlrm
timex.h4310644editdlrm
tlb.h14420644editdlrm
tlbflush.h179090644editdlrm
tls.h31660644editdlrm
topology.h11390644editdlrm
traps.h9110644editdlrm
uaccess-asm.h27030644editdlrm
uaccess.h174310644editdlrm
ucontext.h27450644editdlrm
unified.h9790644editdlrm
unistd.h15780644editdlrm
unwind.h11730644editdlrm
uprobes.h9480644editdlrm
user.h43020644editdlrm
v7m.h32330644editdlrm
vdso.h5070644editdlrm
vdso_datapage.h4440644editdlrm
vermagic.h8000644editdlrm
vfp.h29690644editdlrm
vfpmacros.h20740644editdlrm
vga.h3050644editdlrm
virt.h18550644editdlrm
vmalloc.h870644editdlrm
vmlinux.lds.h44900644editdlrm
word-at-a-time.h21280644editdlrm
xor.h52040644editdlrm
Edit: /usr/src/linux-headers-5.15.0-181/arch/arm/include/asm/checksum.h (4026B)
/* SPDX-License-Identifier: GPL-2.0 */ /* * arch/arm/include/asm/checksum.h * * IP checksum routines * * Copyright (C) Original authors of ../asm-i386/checksum.h * Copyright (C) 1996-1999 Russell King */ #ifndef __ASM_ARM_CHECKSUM_H #define __ASM_ARM_CHECKSUM_H #include /* * computes the checksum of a memory block at buff, length len, * and adds in "sum" (32-bit) * * returns a 32-bit number suitable for feeding into itself * or csum_tcpudp_magic * * this function must be called with even lengths, except * for the last fragment, which may be odd * * it's best to have buff aligned on a 32-bit boundary */ __wsum csum_partial(const void *buff, int len, __wsum sum); /* * the same as csum_partial, but copies from src while it * checksums, and handles user-space pointer exceptions correctly, when needed. * * here even more important to align src and dst on a 32-bit (or even * better 64-bit) boundary */ __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len); __wsum csum_partial_copy_from_user(const void __user *src, void *dst, int len); #define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER #define _HAVE_ARCH_CSUM_AND_COPY static inline __wsum csum_and_copy_from_user(const void __user *src, void *dst, int len) { if (!access_ok(src, len)) return 0; return csum_partial_copy_from_user(src, dst, len); } /* * Fold a partial checksum without adding pseudo headers */ static inline __sum16 csum_fold(__wsum sum) { __asm__( "add %0, %1, %1, ror #16 @ csum_fold" : "=r" (sum) : "r" (sum) : "cc"); return (__force __sum16)(~(__force u32)sum >> 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) { unsigned int tmp1; __wsum sum; __asm__ __volatile__( "ldr %0, [%1], #4 @ ip_fast_csum \n\ ldr %3, [%1], #4 \n\ sub %2, %2, #5 \n\ adds %0, %0, %3 \n\ ldr %3, [%1], #4 \n\ adcs %0, %0, %3 \n\ ldr %3, [%1], #4 \n\ 1: adcs %0, %0, %3 \n\ ldr %3, [%1], #4 \n\ tst %2, #15 @ do this carefully \n\ subne %2, %2, #1 @ without destroying \n\ bne 1b @ the carry flag \n\ adcs %0, %0, %3 \n\ adc %0, %0, #0" : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) : "1" (iph), "2" (ihl) : "cc", "memory"); return csum_fold(sum); } static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, __u8 proto, __wsum sum) { u32 lenprot = len + proto; if (__builtin_constant_p(sum) && sum == 0) { __asm__( "adds %0, %1, %2 @ csum_tcpudp_nofold0 \n\t" #ifdef __ARMEB__ "adcs %0, %0, %3 \n\t" #else "adcs %0, %0, %3, ror #8 \n\t" #endif "adc %0, %0, #0" : "=&r" (sum) : "r" (daddr), "r" (saddr), "r" (lenprot) : "cc"); } else { __asm__( "adds %0, %1, %2 @ csum_tcpudp_nofold \n\t" "adcs %0, %0, %3 \n\t" #ifdef __ARMEB__ "adcs %0, %0, %4 \n\t" #else "adcs %0, %0, %4, ror #8 \n\t" #endif "adc %0, %0, #0" : "=&r"(sum) : "r" (sum), "r" (daddr), "r" (saddr), "r" (lenprot) : "cc"); } return sum; } /* * computes the checksum of the TCP/UDP pseudo-header * returns a 16-bit checksum, already complemented */ static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len, __u8 proto, __wsum sum) { return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); } /* * this routine is used for miscellaneous IP-like checksums, mainly * in icmp.c */ static inline __sum16 ip_compute_csum(const void *buff, int len) { return csum_fold(csum_partial(buff, len, 0)); } #define _HAVE_ARCH_IPV6_CSUM extern __wsum __csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __be32 len, __be32 proto, __wsum sum); static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, __u8 proto, __wsum sum) { return csum_fold(__csum_ipv6_magic(saddr, daddr, htonl(len), htonl(proto), sum)); } #endif