Skip to content

Commit 88ed31a

Browse files
willdeacongregkh
authored andcommitted
arm64: lib: Annotate {clear, copy}_page() as position-independent
[ Upstream commit 8d99020 ] clear_page() and copy_page() are suitable for use outside of the kernel address space, so annotate them as position-independent code. Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Quentin Perret <qperret@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210319100146.1149909-2-qperret@google.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 69e402a commit 88ed31a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎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-
SYM_FUNC_START(clear_page)
17+
SYM_FUNC_START_PI(clear_page)
1818
mrs x1, dczid_el0
1919
and w1, w1, #0xf
2020
mov x2, #4
@@ -25,5 +25,5 @@ SYM_FUNC_START(clear_page)
2525
tst x0, #(PAGE_SIZE - 1)
2626
b.ne 1b
2727
ret
28-
SYM_FUNC_END(clear_page)
28+
SYM_FUNC_END_PI(clear_page)
2929
EXPORT_SYMBOL(clear_page)

‎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-
SYM_FUNC_START(copy_page)
20+
SYM_FUNC_START_PI(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 - 256]
7676

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

0 commit comments

Comments
 (0)