1
2
3
4
5
6
7
8
9
10 #include <linux/linkage.h>
11 #include <asm/assembler.h>
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 .macro ldr1w ptr reg abort
34 ldw.w \reg, [\ptr]+, #4
35 .endm
36
37 .macro ldr4w ptr reg1 reg2 reg3 reg4 abort
38 ldm.w (\reg1, \reg2, \reg3, \reg4), [\ptr]+
39 .endm
40
41 .macro ldr8w ptr reg1 reg2 reg3 reg4 reg5 reg6 reg7 reg8 abort
42 ldm.w (\reg1, \reg2, \reg3, \reg4, \reg5, \reg6, \reg7, \reg8), [\ptr]+
43 .endm
44
45 .macro ldr1b ptr reg cond=al abort
46 notcond \cond, .+8
47 ldb.w \reg, [\ptr]+, #1
48 .endm
49
50 .macro str1w ptr reg abort
51 strusr \reg, \ptr, 4, abort=\abort
52 .endm
53
54 .macro str8w ptr reg1 reg2 reg3 reg4 reg5 reg6 reg7 reg8 abort
55 100: stm.w (\reg1, \reg2, \reg3, \reg4, \reg5, \reg6, \reg7, \reg8), [\ptr]+
56
57 .pushsection __ex_table, "a"
58 .long 100b, \abort
59 .popsection
60 .endm
61
62 .macro str1b ptr reg cond=al abort
63 strusr \reg, \ptr, 1, \cond, abort=\abort
64 .endm
65
66 .macro enter
67 mov r3, #0
68 stm.w (r0, r2, r3), [sp-]
69 .endm
70
71 .macro exit
72 add sp, sp, #8
73 ldm.w (r0), [sp]+
74 mov pc, lr
75 .endm
76
77 .text
78
79 WEAK(raw_copy_to_user)
80
81 #include "copy_template.S"
82
83 ENDPROC(raw_copy_to_user)
84
85 .pushsection .fixup,"ax"
86 .align 0
87 copy_abort_preamble
88 ldm.w (r1, r2, r3), [sp]+
89 sub r0, r0, r1
90 rsub r0, r0, r2
91 copy_abort_end
92 .popsection
93