diff options
author | John Baldwin <jhb@FreeBSD.org> | 2019-07-15 21:25:16 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2019-07-15 21:25:16 +0000 |
commit | c18ca749162a8524ea5b3a6ada0b1e94a46fb81a (patch) | |
tree | 59dd610a980058fc04e326e04cf459792d77d915 /sys/amd64/amd64/trap.c | |
parent | 1af9474b2608696269c52a7dd77c54c9fae615d9 (diff) | |
download | src-c18ca749162a8524ea5b3a6ada0b1e94a46fb81a.tar.gz src-c18ca749162a8524ea5b3a6ada0b1e94a46fb81a.zip |
Don't pass error from syscallenter() to syscallret().
syscallret() doesn't use error anymore. Fix a few other places to permit
removing the return value from syscallenter() entirely.
- Remove a duplicated assertion from arm's syscall().
- Use td_errno for amd64_syscall_ret_flush_l1d.
Reviewed by: kib
MFC after: 1 month
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D2090
Notes
Notes:
svn path=/head/; revision=350013
Diffstat (limited to 'sys/amd64/amd64/trap.c')
-rw-r--r-- | sys/amd64/amd64/trap.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 3bdb01ecfc05..39e7288269d1 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -1169,7 +1169,6 @@ SYSCTL_PROC(_machdep, OID_AUTO, syscall_ret_flush_l1d, CTLTYPE_INT | void amd64_syscall(struct thread *td, int traced) { - int error; ksiginfo_t ksi; #ifdef DIAGNOSTIC @@ -1178,7 +1177,7 @@ amd64_syscall(struct thread *td, int traced) /* NOT REACHED */ } #endif - error = syscallenter(td); + syscallenter(td); /* * Traced syscall. @@ -1203,7 +1202,7 @@ amd64_syscall(struct thread *td, int traced) syscallname(td->td_proc, td->td_sa.code), td->td_md.md_invl_gen.gen)); - syscallret(td, error); + syscallret(td); /* * If the user-supplied value of %rip is not a canonical @@ -1216,5 +1215,5 @@ amd64_syscall(struct thread *td, int traced) if (__predict_false(td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS)) set_pcb_flags(td->td_pcb, PCB_FULL_IRET); - amd64_syscall_ret_flush_l1d_inline(error); + amd64_syscall_ret_flush_l1d_inline(td->td_errno); } |