File tree 3 files changed +25
-48
lines changed 3 files changed +25
-48
lines changed Original file line number Diff line number Diff line change 63
63
_ASM_ALIGN ; \
64
64
_ASM_PTR (entry); \
65
65
.popsection
66
+
67
+ .macro ALIGN_DESTINATION
68
+ /* check for bad alignment of destination */
69
+ movl %edi ,%ecx
70
+ andl $7 ,%ecx
71
+ jz 102f /* already aligned */
72
+ subl $8 ,%ecx
73
+ negl %ecx
74
+ subl %ecx ,%edx
75
+ 100 : movb (%rsi ),%al
76
+ 101 : movb %al ,(%rdi )
77
+ incq %rsi
78
+ incq %rdi
79
+ decl %ecx
80
+ jnz 100b
81
+ 102 :
82
+ .section .fixup ,"ax "
83
+ 103 : addl %ecx ,%edx /* ecx is zerorest also */
84
+ jmp copy_user_handle_tail
85
+ .previous
86
+
87
+ _ASM_EXTABLE (100b ,103b )
88
+ _ASM_EXTABLE (101b ,103b )
89
+ .endm
90
+
66
91
#else
67
92
# define _ASM_EXTABLE (from ,to ) \
68
93
" .pushsection \"__ex_table \",\"a \"\n " \
Original file line number Diff line number Diff line change 16
16
#include <asm/asm.h>
17
17
#include <asm/smap.h>
18
18
19
- .macro ALIGN_DESTINATION
20
- /* check for bad alignment of destination */
21
- movl %edi ,%ecx
22
- andl $7 ,%ecx
23
- jz 102f /* already aligned */
24
- subl $8 ,%ecx
25
- negl %ecx
26
- subl %ecx ,%edx
27
- 100: movb (%rsi ),%al
28
- 101: movb %al ,(%rdi )
29
- incq %rsi
30
- incq %rdi
31
- decl %ecx
32
- jnz 100b
33
- 102:
34
- .section .fixup,"ax"
35
- 103: addl %ecx ,%edx /* ecx is zerorest also */
36
- jmp copy_user_handle_tail
37
- .previous
38
-
39
- _ASM_EXTABLE(100b,103b)
40
- _ASM_EXTABLE(101b,103b)
41
- .endm
42
-
43
19
/* Standard copy_to_user with segment limit checking */
44
20
ENTRY(_copy_to_user)
45
21
CFI_STARTPROC
Original file line number Diff line number Diff line change 14
14
#include <asm/asm.h>
15
15
#include <asm/smap.h>
16
16
17
- .macro ALIGN_DESTINATION
18
- /* check for bad alignment of destination */
19
- movl %edi ,%ecx
20
- andl $7 ,%ecx
21
- jz 102f /* already aligned */
22
- subl $8 ,%ecx
23
- negl %ecx
24
- subl %ecx ,%edx
25
- 100: movb (%rsi ),%al
26
- 101: movb %al ,(%rdi )
27
- incq %rsi
28
- incq %rdi
29
- decl %ecx
30
- jnz 100b
31
- 102:
32
- .section .fixup,"ax"
33
- 103: addl %ecx ,%edx /* ecx is zerorest also */
34
- jmp copy_user_handle_tail
35
- .previous
36
-
37
- _ASM_EXTABLE(100b,103b)
38
- _ASM_EXTABLE(101b,103b)
39
- .endm
40
-
41
17
/*
42
18
* copy_user_nocache - Uncached memory copy with exception handling
43
19
* This will force destination/source out of cache for more performance.
You can’t perform that action at this time.
0 commit comments