diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2003-12-14 01:59:31 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2003-12-14 01:59:31 +0000 |
| commit | a8434283fcfc3f7eeb5a802d45799df21f032319 (patch) | |
| tree | 0893fb8582f17206204ce3ad39bfa69f57410313 | |
| parent | ba102043bc36abea4620ce450b738c9f87d4c8f3 (diff) | |
Notes
| -rw-r--r-- | sys/ia64/ia64/machdep.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 28aa70cb84f8..ae55edf1d1ce 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -1118,13 +1118,18 @@ set_mcontext(struct thread *td, const mcontext_t *mc) if (mc->mc_flags & _MC_FLAGS_ASYNC_CONTEXT) { /* * We can get an async context passed to us while we - * entered the kernel through a syscall: sigreturn(2). + * entered the kernel through a syscall: sigreturn(2) + * and kse_switchin(2) both take contexts that could + * previously be the result of a trap or interrupt. * Hence, we cannot assert that the trapframe is not - * a syscall frame, but we can assert that if it is - * the syscall is sigreturn(2). + * a syscall frame, but we can assert that it's at + * least an expected syscall. */ - if (tf->tf_flags & FRAME_SYSCALL) - KASSERT(tf->tf_scratch.gr15 == SYS_sigreturn, ("foo")); + if (tf->tf_flags & FRAME_SYSCALL) { + KASSERT(tf->tf_scratch.gr15 == SYS_sigreturn || + tf->tf_scratch.gr15 == SYS_kse_switchin, ("foo")); + tf->tf_flags &= ~FRAME_SYSCALL; + } tf->tf_scratch = mc->mc_scratch; tf->tf_scratch_fp = mc->mc_scratch_fp; if (mc->mc_flags & _MC_FLAGS_HIGHFP_VALID) |
