.. | .. |
---|
3 | 3 | |
---|
4 | 4 | #include <linux/linkage.h> |
---|
5 | 5 | #include <asm/cpufeatures.h> |
---|
6 | | -#include <asm/alternative-asm.h> |
---|
| 6 | +#include <asm/alternative.h> |
---|
7 | 7 | #include <asm/export.h> |
---|
8 | 8 | |
---|
9 | 9 | /* |
---|
.. | .. |
---|
17 | 17 | * |
---|
18 | 18 | * rax original destination |
---|
19 | 19 | */ |
---|
20 | | -.weak memset |
---|
21 | | -.p2align 4, 0x90 |
---|
22 | | -memset: |
---|
23 | | -ENTRY(__memset) |
---|
| 20 | +SYM_FUNC_START_WEAK(memset) |
---|
| 21 | +SYM_FUNC_START(__memset) |
---|
24 | 22 | /* |
---|
25 | 23 | * Some CPUs support enhanced REP MOVSB/STOSB feature. It is recommended |
---|
26 | 24 | * to use it when possible. If not available, use fast string instructions. |
---|
.. | .. |
---|
42 | 40 | movl %edx,%ecx |
---|
43 | 41 | rep stosb |
---|
44 | 42 | movq %r9,%rax |
---|
45 | | - ret |
---|
46 | | -ENDPROC(memset) |
---|
47 | | -ENDPROC(__memset) |
---|
| 43 | + RET |
---|
| 44 | +SYM_FUNC_END(__memset) |
---|
| 45 | +SYM_FUNC_END_ALIAS(memset) |
---|
48 | 46 | EXPORT_SYMBOL(memset) |
---|
49 | 47 | EXPORT_SYMBOL(__memset) |
---|
50 | 48 | |
---|
.. | .. |
---|
59 | 57 | * |
---|
60 | 58 | * rax original destination |
---|
61 | 59 | */ |
---|
62 | | -ENTRY(memset_erms) |
---|
| 60 | +SYM_FUNC_START_LOCAL(memset_erms) |
---|
63 | 61 | movq %rdi,%r9 |
---|
64 | 62 | movb %sil,%al |
---|
65 | 63 | movq %rdx,%rcx |
---|
66 | 64 | rep stosb |
---|
67 | 65 | movq %r9,%rax |
---|
68 | | - ret |
---|
69 | | -ENDPROC(memset_erms) |
---|
| 66 | + RET |
---|
| 67 | +SYM_FUNC_END(memset_erms) |
---|
70 | 68 | |
---|
71 | | -ENTRY(memset_orig) |
---|
| 69 | +SYM_FUNC_START_LOCAL(memset_orig) |
---|
72 | 70 | movq %rdi,%r10 |
---|
73 | 71 | |
---|
74 | 72 | /* expand byte value */ |
---|
.. | .. |
---|
127 | 125 | |
---|
128 | 126 | .Lende: |
---|
129 | 127 | movq %r10,%rax |
---|
130 | | - ret |
---|
| 128 | + RET |
---|
131 | 129 | |
---|
132 | 130 | .Lbad_alignment: |
---|
133 | 131 | cmpq $7,%rdx |
---|
.. | .. |
---|
139 | 137 | subq %r8,%rdx |
---|
140 | 138 | jmp .Lafter_bad_alignment |
---|
141 | 139 | .Lfinal: |
---|
142 | | -ENDPROC(memset_orig) |
---|
| 140 | +SYM_FUNC_END(memset_orig) |
---|