Skip to content

Commit 1724208

Browse files
mrutland-armwilldeacon
authored andcommitted
arm64: uaccess: remove unnecessary earlyclobber
Currently the asm constraints for __get_mem_asm() mark the value register as an earlyclobber operand. This means that the compiler can't reuse the same register for both the address and value, even when the value is not subsequently used. There's no need for the value register to be marked as earlyclobber, as it's only written to after the address register is consumed, even when the access faults. Remove the unnecessary earlyclobber. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 4a3f806 commit 1724208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/include/asm/uaccess.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static inline void __user *__uaccess_mask_ptr(const void __user *ptr)
237237
"1: " load " " reg "1, [%2]\n" \
238238
"2:\n" \
239239
_ASM_EXTABLE_##type##ACCESS_ERR_ZERO(1b, 2b, %w0, %w1) \
240-
: "+r" (err), "=&r" (x) \
240+
: "+r" (err), "=r" (x) \
241241
: "r" (addr))
242242

243243
#define __raw_get_mem(ldr, x, ptr, err, type) \

0 commit comments

Comments
 (0)