diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2023-03-24 17:00:20 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2023-04-04 19:27:24 +0300 |
commit | 4e0b0ad45c6616d85564cb27dbae04a962d068bd (patch) | |
tree | ec2a3575c83277c40810f805c87769f6e2fd605e | |
parent | b96adf0d03e01fa10483f38e302a5f93bb733ed0 (diff) | |
download | linux-4e0b0ad45c6616d85564cb27dbae04a962d068bd.tar.xz |
s390/uaccess: rename/sort labels in inline assemblies
Rename and sort labels in uaccess inline assemblies to increase
readability. In addition have only one EX_TABLE entry per line - also to
increase readability.
Except for debug sections the output of "objdump -Dr" of the uaccess object
file is identical before/after this change.
Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r-- | arch/s390/lib/uaccess.c | 51 |
1 files changed, 30 insertions, 21 deletions
diff --git a/arch/s390/lib/uaccess.c b/arch/s390/lib/uaccess.c index d0bbdcbd7baf..4dec9fc12f73 100644 --- a/arch/s390/lib/uaccess.c +++ b/arch/s390/lib/uaccess.c @@ -46,7 +46,7 @@ static unsigned long raw_copy_from_user_key(void *to, const void __user *from, asm volatile( " lr 0,%[spec]\n" "0: mvcos 0(%[to]),0(%[from]),%[size]\n" - "6: jz 4f\n" + "1: jz 5f\n" " algr %[size],%[tmp1]\n" " slgr %[from],%[tmp1]\n" " slgr %[to],%[tmp1]\n" @@ -55,13 +55,16 @@ static unsigned long raw_copy_from_user_key(void *to, const void __user *from, " nr %[tmp2],%[tmp1]\n" /* tmp2 = (from + 4095) & -4096 */ " slgr %[tmp2],%[from]\n" " clgr %[size],%[tmp2]\n" /* copy crosses next page boundary? */ - " jnh 5f\n" + " jnh 6f\n" "3: mvcos 0(%[to]),0(%[from]),%[tmp2]\n" - "7: slgr %[size],%[tmp2]\n" - " j 5f\n" - "4: slgr %[size],%[size]\n" - "5:\n" - EX_TABLE(0b,2b) EX_TABLE(3b,5b) EX_TABLE(6b,2b) EX_TABLE(7b,5b) + "4: slgr %[size],%[tmp2]\n" + " j 6f\n" + "5: slgr %[size],%[size]\n" + "6:\n" + EX_TABLE(0b, 2b) + EX_TABLE(3b, 6b) + EX_TABLE(1b, 2b) + EX_TABLE(4b, 6b) : [size] "+a" (size), [from] "+a" (from), [to] "+a" (to), [tmp1] "+a" (tmp1), [tmp2] "=a" (tmp2) : [spec] "d" (spec.val) @@ -107,7 +110,7 @@ static unsigned long raw_copy_to_user_key(void __user *to, const void *from, asm volatile( " lr 0,%[spec]\n" "0: mvcos 0(%[to]),0(%[from]),%[size]\n" - "6: jz 4f\n" + "1: jz 5f\n" " algr %[size],%[tmp1]\n" " slgr %[to],%[tmp1]\n" " slgr %[from],%[tmp1]\n" @@ -116,13 +119,16 @@ static unsigned long raw_copy_to_user_key(void __user *to, const void *from, " nr %[tmp2],%[tmp1]\n" /* tmp2 = (to + 4095) & -4096 */ " slgr %[tmp2],%[to]\n" " clgr %[size],%[tmp2]\n" /* copy crosses next page boundary? */ - " jnh 5f\n" + " jnh 6f\n" "3: mvcos 0(%[to]),0(%[from]),%[tmp2]\n" - "7: slgr %[size],%[tmp2]\n" - " j 5f\n" - "4: slgr %[size],%[size]\n" - "5:\n" - EX_TABLE(0b,2b) EX_TABLE(3b,5b) EX_TABLE(6b,2b) EX_TABLE(7b,5b) + "4: slgr %[size],%[tmp2]\n" + " j 6f\n" + "5: slgr %[size],%[size]\n" + "6:\n" + EX_TABLE(0b, 2b) + EX_TABLE(3b, 6b) + EX_TABLE(1b, 2b) + EX_TABLE(4b, 6b) : [size] "+a" (size), [to] "+a" (to), [from] "+a" (from), [tmp1] "+a" (tmp1), [tmp2] "=a" (tmp2) : [spec] "d" (spec.val) @@ -159,7 +165,7 @@ unsigned long __clear_user(void __user *to, unsigned long size) asm volatile( " lr 0,%[spec]\n" "0: mvcos 0(%[to]),0(%[zeropg]),%[size]\n" - "6: jz 4f\n" + "1: jz 5f\n" " algr %[size],%[tmp1]\n" " slgr %[to],%[tmp1]\n" " j 0b\n" @@ -167,13 +173,16 @@ unsigned long __clear_user(void __user *to, unsigned long size) " nr %[tmp2],%[tmp1]\n" /* tmp2 = (to + 4095) & -4096 */ " slgr %[tmp2],%[to]\n" " clgr %[size],%[tmp2]\n" /* copy crosses next page boundary? */ - " jnh 5f\n" + " jnh 6f\n" "3: mvcos 0(%[to]),0(%[zeropg]),%[tmp2]\n" - "7: slgr %[size],%[tmp2]\n" - " j 5f\n" - "4: slgr %[size],%[size]\n" - "5:\n" - EX_TABLE(0b,2b) EX_TABLE(6b,2b) EX_TABLE(3b,5b) EX_TABLE(7b,5b) + "4: slgr %[size],%[tmp2]\n" + " j 6f\n" + "5: slgr %[size],%[size]\n" + "6:\n" + EX_TABLE(0b, 2b) + EX_TABLE(1b, 2b) + EX_TABLE(3b, 6b) + EX_TABLE(4b, 6b) : [size] "+&a" (size), [to] "+&a" (to), [tmp1] "+a" (tmp1), [tmp2] "=&a" (tmp2) : [zeropg] "a" (empty_zero_page), [spec] "d" (spec.val) |