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 .macro ldrb1 ptr, regB, val
23 ldrb \ptr, [\regB], \val
24 .endm
25
26 .macro strb1 ptr, regB, val
27 uao_user_alternative 9998f, strb, sttrb, \ptr, \regB, \val
28 .endm
29
30 .macro ldrh1 ptr, regB, val
31 ldrh \ptr, [\regB], \val
32 .endm
33
34 .macro strh1 ptr, regB, val
35 uao_user_alternative 9998f, strh, sttrh, \ptr, \regB, \val
36 .endm
37
38 .macro ldr1 ptr, regB, val
39 ldr \ptr, [\regB], \val
40 .endm
41
42 .macro str1 ptr, regB, val
43 uao_user_alternative 9998f, str, sttr, \ptr, \regB, \val
44 .endm
45
46 .macro ldp1 ptr, regB, regC, val
47 ldp \ptr, \regB, [\regC], \val
48 .endm
49
50 .macro stp1 ptr, regB, regC, val
51 uao_stp 9998f, \ptr, \regB, \regC, \val
52 .endm
53
54 end .req x5
55 ENTRY(__arch_copy_to_user)
56 add end, x0, x2
57 #include "copy_template.S"
58 mov x0, #0
59 ret
60 ENDPROC(__arch_copy_to_user)
61 EXPORT_SYMBOL(__arch_copy_to_user)
62
63 .section .fixup,"ax"
64 .align 2
65 9998: sub x0, end, dst
66 ret
67 .previous