Commit aa0eecb0 authored by Carlos O'Donell's avatar Carlos O'Donell Committed by Kyle McMartin

[PARISC] Document some register usages in assembly files

Document clobbers and args in entry.S and syscall.S.

entry.S: Add comment to indicate that cr27 may recycle and EDEADLOCK
detection is not 100% correct. Since this is only enabled when using
ENABLE_LWS_DEBUG, the user is warned by the comment.
Signed-off-by: default avatarCarlos O'Donell <carlos@parisc-linux.org>
Signed-off-by: default avatarKyle McMartin <kyle@parisc-linux.org>
parent 75be99a8
...@@ -1846,6 +1846,7 @@ sys_clone_wrapper: ...@@ -1846,6 +1846,7 @@ sys_clone_wrapper:
ldo -16(%r30),%r29 /* Reference param save area */ ldo -16(%r30),%r29 /* Reference param save area */
#endif #endif
/* WARNING - Clobbers r19 and r21, userspace must save these! */
STREG %r2,PT_GR19(%r1) /* save for child */ STREG %r2,PT_GR19(%r1) /* save for child */
STREG %r30,PT_GR21(%r1) STREG %r30,PT_GR21(%r1)
BL sys_clone,%r2 BL sys_clone,%r2
......
...@@ -164,7 +164,7 @@ linux_gateway_entry: ...@@ -164,7 +164,7 @@ linux_gateway_entry:
#endif #endif
STREG %r2, TASK_PT_GR30(%r1) /* ... and save it */ STREG %r2, TASK_PT_GR30(%r1) /* ... and save it */
STREG %r20, TASK_PT_GR20(%r1) STREG %r20, TASK_PT_GR20(%r1) /* Syscall number */
STREG %r21, TASK_PT_GR21(%r1) STREG %r21, TASK_PT_GR21(%r1)
STREG %r22, TASK_PT_GR22(%r1) STREG %r22, TASK_PT_GR22(%r1)
STREG %r23, TASK_PT_GR23(%r1) /* 4th argument */ STREG %r23, TASK_PT_GR23(%r1) /* 4th argument */
...@@ -527,6 +527,7 @@ lws_compare_and_swap: ...@@ -527,6 +527,7 @@ lws_compare_and_swap:
We *must* giveup this call and fail. We *must* giveup this call and fail.
*/ */
ldw 4(%sr2,%r20), %r28 /* Load thread register */ ldw 4(%sr2,%r20), %r28 /* Load thread register */
/* WARNING: If cr27 cycles to the same value we have problems */
mfctl %cr27, %r21 /* Get current thread register */ mfctl %cr27, %r21 /* Get current thread register */
cmpb,<>,n %r21, %r28, cas_lock /* Called recursive? */ cmpb,<>,n %r21, %r28, cas_lock /* Called recursive? */
b lws_exit /* Return error! */ b lws_exit /* Return error! */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment