Skip to content

Commit

Permalink
arm64: mte: Clean up user tag accessors
Browse files Browse the repository at this point in the history
Invoking user_ldst to explicitly add a post-increment of 0 is silly.
Just use a normal USER() annotation and save the redundant instruction.

Signed-off-by: Robin Murphy <[email protected]>
Reviewed-by: Tong Tiangen <[email protected]>
Acked-by: Mark Rutland <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Catalin Marinas <[email protected]>
  • Loading branch information
rmurphy-arm authored and ctmarinas committed May 16, 2022
1 parent fb396bb commit b4d6bb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm64/lib/mte.S
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ SYM_FUNC_START(mte_copy_tags_from_user)
mov x3, x1
cbz x2, 2f
1:
user_ldst 2f, ldtrb, w4, x1, 0
USER(2f, ldtrb w4, [x1])
lsl x4, x4, #MTE_TAG_SHIFT
stg x4, [x0], #MTE_GRANULE_SIZE
add x1, x1, #1
Expand All @@ -120,7 +120,7 @@ SYM_FUNC_START(mte_copy_tags_to_user)
1:
ldg x4, [x1]
ubfx x4, x4, #MTE_TAG_SHIFT, #MTE_TAG_SIZE
user_ldst 2f, sttrb, w4, x0, 0
USER(2f, sttrb w4, [x0])
add x0, x0, #1
add x1, x1, #MTE_GRANULE_SIZE
subs x2, x2, #1
Expand Down

0 comments on commit b4d6bb3

Please sign in to comment.