Skip to content

Commit 3ac0f45

Browse files
brooniewilldeacon
authored andcommitted
arm64: lib: Use modern annotations for assembly functions
In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC and also add a new annotation for static functions which previously had no ENTRY equivalent. Update the annotations in the library code to the new macros. Signed-off-by: Mark Brown <[email protected]> [will: Use SYM_FUNC_START_WEAK_PI] Signed-off-by: Will Deacon <[email protected]>
1 parent 35e61c7 commit 3ac0f45

19 files changed

+50
-50
lines changed

arch/arm64/lib/clear_page.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Parameters:
1515
* x0 - dest
1616
*/
17-
ENTRY(clear_page)
17+
SYM_FUNC_START(clear_page)
1818
mrs x1, dczid_el0
1919
and w1, w1, #0xf
2020
mov x2, #4
@@ -25,5 +25,5 @@ ENTRY(clear_page)
2525
tst x0, #(PAGE_SIZE - 1)
2626
b.ne 1b
2727
ret
28-
ENDPROC(clear_page)
28+
SYM_FUNC_END(clear_page)
2929
EXPORT_SYMBOL(clear_page)

arch/arm64/lib/clear_user.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* Alignment fixed up by hardware.
2121
*/
22-
ENTRY(__arch_clear_user)
22+
SYM_FUNC_START(__arch_clear_user)
2323
mov x2, x1 // save the size for fixup return
2424
subs x1, x1, #8
2525
b.mi 2f
@@ -40,7 +40,7 @@ uao_user_alternative 9f, strh, sttrh, wzr, x0, 2
4040
uao_user_alternative 9f, strb, sttrb, wzr, x0, 0
4141
5: mov x0, #0
4242
ret
43-
ENDPROC(__arch_clear_user)
43+
SYM_FUNC_END(__arch_clear_user)
4444
EXPORT_SYMBOL(__arch_clear_user)
4545

4646
.section .fixup,"ax"

arch/arm64/lib/copy_from_user.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353
.endm
5454

5555
end .req x5
56-
ENTRY(__arch_copy_from_user)
56+
SYM_FUNC_START(__arch_copy_from_user)
5757
add end, x0, x2
5858
#include "copy_template.S"
5959
mov x0, #0 // Nothing to copy
6060
ret
61-
ENDPROC(__arch_copy_from_user)
61+
SYM_FUNC_END(__arch_copy_from_user)
6262
EXPORT_SYMBOL(__arch_copy_from_user)
6363

6464
.section .fixup,"ax"

arch/arm64/lib/copy_in_user.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555

5656
end .req x5
5757

58-
ENTRY(__arch_copy_in_user)
58+
SYM_FUNC_START(__arch_copy_in_user)
5959
add end, x0, x2
6060
#include "copy_template.S"
6161
mov x0, #0
6262
ret
63-
ENDPROC(__arch_copy_in_user)
63+
SYM_FUNC_END(__arch_copy_in_user)
6464
EXPORT_SYMBOL(__arch_copy_in_user)
6565

6666
.section .fixup,"ax"

arch/arm64/lib/copy_page.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* x0 - dest
1818
* x1 - src
1919
*/
20-
ENTRY(copy_page)
20+
SYM_FUNC_START(copy_page)
2121
alternative_if ARM64_HAS_NO_HW_PREFETCH
2222
// Prefetch three cache lines ahead.
2323
prfm pldl1strm, [x1, #128]
@@ -75,5 +75,5 @@ alternative_else_nop_endif
7575
stnp x16, x17, [x0, #112]
7676

7777
ret
78-
ENDPROC(copy_page)
78+
SYM_FUNC_END(copy_page)
7979
EXPORT_SYMBOL(copy_page)

arch/arm64/lib/copy_to_user.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@
5252
.endm
5353

5454
end .req x5
55-
ENTRY(__arch_copy_to_user)
55+
SYM_FUNC_START(__arch_copy_to_user)
5656
add end, x0, x2
5757
#include "copy_template.S"
5858
mov x0, #0
5959
ret
60-
ENDPROC(__arch_copy_to_user)
60+
SYM_FUNC_END(__arch_copy_to_user)
6161
EXPORT_SYMBOL(__arch_copy_to_user)
6262

6363
.section .fixup,"ax"

arch/arm64/lib/crc32.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ CPU_BE( rev16 w3, w3 )
8585
.endm
8686

8787
.align 5
88-
ENTRY(crc32_le)
88+
SYM_FUNC_START(crc32_le)
8989
alternative_if_not ARM64_HAS_CRC32
9090
b crc32_le_base
9191
alternative_else_nop_endif
9292
__crc32
93-
ENDPROC(crc32_le)
93+
SYM_FUNC_END(crc32_le)
9494

9595
.align 5
96-
ENTRY(__crc32c_le)
96+
SYM_FUNC_START(__crc32c_le)
9797
alternative_if_not ARM64_HAS_CRC32
9898
b __crc32c_le_base
9999
alternative_else_nop_endif
100100
__crc32 c
101-
ENDPROC(__crc32c_le)
101+
SYM_FUNC_END(__crc32c_le)

arch/arm64/lib/memchr.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* Returns:
2020
* x0 - address of first occurrence of 'c' or 0
2121
*/
22-
WEAK(memchr)
22+
SYM_FUNC_START_WEAK_PI(memchr)
2323
and w1, w1, #0xff
2424
1: subs x2, x2, #1
2525
b.mi 2f
@@ -30,5 +30,5 @@ WEAK(memchr)
3030
ret
3131
2: mov x0, #0
3232
ret
33-
ENDPIPROC(memchr)
33+
SYM_FUNC_END_PI(memchr)
3434
EXPORT_SYMBOL_NOKASAN(memchr)

arch/arm64/lib/memcmp.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pos .req x11
4646
limit_wd .req x12
4747
mask .req x13
4848

49-
WEAK(memcmp)
49+
SYM_FUNC_START_WEAK_PI(memcmp)
5050
cbz limit, .Lret0
5151
eor tmp1, src1, src2
5252
tst tmp1, #7
@@ -243,5 +243,5 @@ CPU_LE( rev data2, data2 )
243243
.Lret0:
244244
mov result, #0
245245
ret
246-
ENDPIPROC(memcmp)
246+
SYM_FUNC_END_PI(memcmp)
247247
EXPORT_SYMBOL_NOKASAN(memcmp)

arch/arm64/lib/memcpy.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@
5757
.endm
5858

5959
.weak memcpy
60-
ENTRY(__memcpy)
61-
ENTRY(memcpy)
60+
SYM_FUNC_START_ALIAS(__memcpy)
61+
SYM_FUNC_START_PI(memcpy)
6262
#include "copy_template.S"
6363
ret
64-
ENDPIPROC(memcpy)
64+
SYM_FUNC_END_PI(memcpy)
6565
EXPORT_SYMBOL(memcpy)
66-
ENDPROC(__memcpy)
66+
SYM_FUNC_END_ALIAS(__memcpy)
6767
EXPORT_SYMBOL(__memcpy)

0 commit comments

Comments
 (0)