mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 13:37:36 +02:00
arm64: lib: Annotate {clear, copy}_page() as position-independent
[ Upstream commit 8d9902055c ]
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>
This commit is contained in:
parent
69e402a985
commit
88ed31aab4
|
|
@ -14,7 +14,7 @@
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* x0 - dest
|
* x0 - dest
|
||||||
*/
|
*/
|
||||||
SYM_FUNC_START(clear_page)
|
SYM_FUNC_START_PI(clear_page)
|
||||||
mrs x1, dczid_el0
|
mrs x1, dczid_el0
|
||||||
and w1, w1, #0xf
|
and w1, w1, #0xf
|
||||||
mov x2, #4
|
mov x2, #4
|
||||||
|
|
@ -25,5 +25,5 @@ SYM_FUNC_START(clear_page)
|
||||||
tst x0, #(PAGE_SIZE - 1)
|
tst x0, #(PAGE_SIZE - 1)
|
||||||
b.ne 1b
|
b.ne 1b
|
||||||
ret
|
ret
|
||||||
SYM_FUNC_END(clear_page)
|
SYM_FUNC_END_PI(clear_page)
|
||||||
EXPORT_SYMBOL(clear_page)
|
EXPORT_SYMBOL(clear_page)
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* x0 - dest
|
* x0 - dest
|
||||||
* x1 - src
|
* x1 - src
|
||||||
*/
|
*/
|
||||||
SYM_FUNC_START(copy_page)
|
SYM_FUNC_START_PI(copy_page)
|
||||||
alternative_if ARM64_HAS_NO_HW_PREFETCH
|
alternative_if ARM64_HAS_NO_HW_PREFETCH
|
||||||
// Prefetch three cache lines ahead.
|
// Prefetch three cache lines ahead.
|
||||||
prfm pldl1strm, [x1, #128]
|
prfm pldl1strm, [x1, #128]
|
||||||
|
|
@ -75,5 +75,5 @@ alternative_else_nop_endif
|
||||||
stnp x16, x17, [x0, #112 - 256]
|
stnp x16, x17, [x0, #112 - 256]
|
||||||
|
|
||||||
ret
|
ret
|
||||||
SYM_FUNC_END(copy_page)
|
SYM_FUNC_END_PI(copy_page)
|
||||||
EXPORT_SYMBOL(copy_page)
|
EXPORT_SYMBOL(copy_page)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user