diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2011-07-07 18:11:25 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2011-07-07 18:11:25 +0000 |
commit | f0dbc508cb2d1060a83c43da71f60ac4bab02188 (patch) | |
tree | 260e73ca64d22b10f4541858e6ee7fea0b7c1bff /sys/arch/sparc64/fpu | |
parent | 291e013ccd4b9989e6d79d1ae219784a4a37894e (diff) |
There is a bunch of places in the kernel entry points where we don't
hold the kernel lock, but still need call one function that needs it.
Instead of grabbing the lock all over the place, move the locks into
the affected functions: trapsignal, scdebug*, ktrsyscall, ktrsysret,
systrace_redirect and ADDUPROF. In the cases we already hold the biglock
we'll just recurse.
kettenis@, beck@ ok
Diffstat (limited to 'sys/arch/sparc64/fpu')
-rw-r--r-- | sys/arch/sparc64/fpu/fpu.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/arch/sparc64/fpu/fpu.c b/sys/arch/sparc64/fpu/fpu.c index 6c524414a0a..82ecd01693f 100644 --- a/sys/arch/sparc64/fpu/fpu.c +++ b/sys/arch/sparc64/fpu/fpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu.c,v 1.15 2011/07/06 21:41:37 art Exp $ */ +/* $OpenBSD: fpu.c,v 1.16 2011/07/07 18:11:24 art Exp $ */ /* $NetBSD: fpu.c,v 1.11 2000/12/06 01:47:50 mrg Exp $ */ /* @@ -214,9 +214,7 @@ fpu_cleanup(p, fs) case FSR_TT_IEEE: if ((i = fsr & FSR_CX) == 0) panic("fpu ieee trap, but no exception"); - KERNEL_LOCK(); trapsignal(p, SIGFPE, fpu_codes[i - 1], fpu_types[i - 1], sv); - KERNEL_UNLOCK(); break; /* XXX should return, but queue remains */ case FSR_TT_UNFIN: @@ -239,9 +237,7 @@ fpu_cleanup(p, fs) log(LOG_ERR, "fpu hardware error (%s[%d])\n", p->p_comm, p->p_pid); uprintf("%s[%d]: fpu hardware error\n", p->p_comm, p->p_pid); - KERNEL_LOCK(); trapsignal(p, SIGFPE, -1, FPE_FLTINV, sv); /* ??? */ - KERNEL_UNLOCK(); goto out; default: @@ -264,17 +260,13 @@ fpu_cleanup(p, fs) continue; case FPE: - KERNEL_LOCK(); trapsignal(p, SIGFPE, fpu_codes[(fs->fs_fsr & FSR_CX) - 1], fpu_types[(fs->fs_fsr & FSR_CX) - 1], sv); - KERNEL_UNLOCK(); break; case NOTFPU: - KERNEL_LOCK(); trapsignal(p, SIGILL, 0, ILL_COPROC, sv); - KERNEL_UNLOCK(); break; default: |