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