1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/arm/lib/csumpartialcopyuser.S
5 * Copyright (C) 1995-1998 Russell King
7 * 27/03/03 Ian Molton Clean up CONFIG_CPU
9 #include <linux/linkage.h>
10 #include <asm/assembler.h>
11 #include <asm/errno.h>
12 #include <asm/asm-offsets.h>
16 #ifdef CONFIG_CPU_SW_DOMAIN_PAN
18 mrc p15, 0, ip, c3, c0, 0
19 stmfd sp!, {r1, r2, r4 - r8, ip, lr}
24 ldmfd sp!, {r1, r2, r4 - r8, ip, lr}
25 mcr p15, 0, ip, c3, c0, 0
30 stmfd sp!, {r1, r2, r4 - r8, lr}
34 ldmfd sp!, {r1, r2, r4 - r8, pc}
42 .macro load2b, reg1, reg2
51 .macro load2l, reg1, reg2
56 .macro load4l, reg1, reg2, reg3, reg4
65 * csum_partial_copy_from_user(const char *src, char *dst, int len)
66 * r0 = src, r1 = dst, r2 = len
67 * Returns : r0 = checksum or 0
70 #define FN_ENTRY ENTRY(csum_partial_copy_from_user)
71 #define FN_EXIT ENDPROC(csum_partial_copy_from_user)
73 #include "csumpartialcopygeneric.S"
76 * We report fault by returning 0 csum - impossible in normal case, since
77 * we start with 0xffffffff for initial sum.
79 .pushsection .text.fixup,"ax"