1
2
3
4
5
6#include <linux/linkage.h>
7
8#include <asm/asm-uaccess.h>
9#include <asm/assembler.h>
10#include <asm/cache.h>
11
12
13
14
15
16
17
18
19
20
21
22
23 .macro ldrb1 reg, ptr, val
24 user_ldst 9998f, ldtrb, \reg, \ptr, \val
25 .endm
26
27 .macro strb1 reg, ptr, val
28 strb \reg, [\ptr], \val
29 .endm
30
31 .macro ldrh1 reg, ptr, val
32 user_ldst 9997f, ldtrh, \reg, \ptr, \val
33 .endm
34
35 .macro strh1 reg, ptr, val
36 strh \reg, [\ptr], \val
37 .endm
38
39 .macro ldr1 reg, ptr, val
40 user_ldst 9997f, ldtr, \reg, \ptr, \val
41 .endm
42
43 .macro str1 reg, ptr, val
44 str \reg, [\ptr], \val
45 .endm
46
47 .macro ldp1 reg1, reg2, ptr, val
48 user_ldp 9997f, \reg1, \reg2, \ptr, \val
49 .endm
50
51 .macro stp1 reg1, reg2, ptr, val
52 stp \reg1, \reg2, [\ptr], \val
53 .endm
54
55end .req x5
56srcin .req x15
57SYM_FUNC_START(__arch_copy_from_user)
58 add end, x0, x2
59 mov srcin, x1
60#include "copy_template.S"
61 mov x0,
62 ret
63SYM_FUNC_END(__arch_copy_from_user)
64EXPORT_SYMBOL(__arch_copy_from_user)
65
66 .section .fixup,"ax"
67 .align 2
689997: cmp dst, dstin
69 b.ne 9998f
70
71USER(9998f, ldtrb tmp1w, [srcin])
72 strb tmp1w, [dst],
739998: sub x0, end, dst
74 ret
75 .previous
76