s390/uaccess: Cleanup noinstr __put_user()/__get_user() inline assembly constraints

Remove superfluous underscores, brackets, and early clobber to make
the code a bit more readable.

Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
Heiko Carstens 2025-01-13 13:37:03 +01:00 committed by Alexander Gordeev
parent 718056f9d9
commit 67e959af25

View File

@ -99,14 +99,14 @@ __put_user_##type##_noinstr(unsigned type __user *to, \
int rc; \
\
asm volatile( \
" lr 0,%[spec]\n" \
"0: mvcos %[_to],%[_from],%[_size]\n" \
"1: xr %[rc],%[rc]\n" \
" lr %%r0,%[spec]\n" \
"0: mvcos %[to],%[from],%[size]\n" \
"1: lhi %[rc],0\n" \
"2:\n" \
EX_TABLE_UA_FAULT(0b, 2b, %[rc]) \
EX_TABLE_UA_FAULT(1b, 2b, %[rc]) \
: [rc] "=&d" (rc), [_to] "+Q" (*(to)) \
: [_size] "d" (size), [_from] "Q" (*(from)), \
: [rc] "=d" (rc), [to] "+Q" (*to) \
: [size] "d" (size), [from] "Q" (*from), \
[spec] "d" (__oac_spec.val) \
: "cc", "0"); \
return rc; \
@ -183,16 +183,16 @@ __get_user_##type##_noinstr(unsigned type *to, \
int rc; \
\
asm volatile( \
" lr 0,%[spec]\n" \
"0: mvcos 0(%[_to]),%[_from],%[_size]\n" \
"1: xr %[rc],%[rc]\n" \
" lr %%r0,%[spec]\n" \
"0: mvcos 0(%[to]),%[from],%[size]\n" \
"1: lhi %[rc],0\n" \
"2:\n" \
EX_TABLE_UA_LOAD_MEM(0b, 2b, %[rc], %[_to], %[_ksize]) \
EX_TABLE_UA_LOAD_MEM(1b, 2b, %[rc], %[_to], %[_ksize]) \
: [rc] "=&d" (rc), "=Q" (*(to)) \
: [_size] "d" (size), [_from] "Q" (*(from)), \
[spec] "d" (__oac_spec.val), [_to] "a" (to), \
[_ksize] "K" (size) \
EX_TABLE_UA_LOAD_MEM(0b, 2b, %[rc], %[to], %[ksize]) \
EX_TABLE_UA_LOAD_MEM(1b, 2b, %[rc], %[to], %[ksize]) \
: [rc] "=d" (rc), "=Q" (*to) \
: [size] "d" (size), [from] "Q" (*from), \
[spec] "d" (__oac_spec.val), [to] "a" (to), \
[ksize] "K" (size) \
: "cc", "0"); \
return rc; \
} \