diff options
author | attilio <attilio@FreeBSD.org> | 2008-08-13 18:29:29 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2008-08-13 18:29:29 +0000 |
commit | 9d7147e6705596f8536df40e157210a88878a3e8 (patch) | |
tree | e507eab3d038c1d8c501f833c6a765981c11aa5f | |
parent | ff459eb3cfd3287ee44d63c30f2754be68b38372 (diff) | |
download | FreeBSD-src-9d7147e6705596f8536df40e157210a88878a3e8.zip FreeBSD-src-9d7147e6705596f8536df40e157210a88878a3e8.tar.gz |
In the case of POWERFAIL_NMI, remove the Giant acquisitions because they
can lead to a deadlock if the thread owning the Giant lock is interrupted
by the NMI.
Instead, tollerate a small race on the x86 architecture.
-rw-r--r-- | sys/i386/i386/trap.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 54ad150..3306e7c 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -454,13 +454,11 @@ trap(struct trapframe *frame) #ifndef TIMER_FREQ # define TIMER_FREQ 1193182 #endif - mtx_lock(&Giant); if (time_second - lastalert > 10) { log(LOG_WARNING, "NMI: power fail\n"); sysbeep(880, hz); lastalert = time_second; } - mtx_unlock(&Giant); goto userout; #else /* !POWERFAIL_NMI */ /* machine/parity/power fail/"kitchen sink" faults */ @@ -688,13 +686,11 @@ trap(struct trapframe *frame) #ifdef DEV_ISA case T_NMI: #ifdef POWERFAIL_NMI - mtx_lock(&Giant); if (time_second - lastalert > 10) { log(LOG_WARNING, "NMI: power fail\n"); sysbeep(880, hz); lastalert = time_second; } - mtx_unlock(&Giant); goto out; #else /* !POWERFAIL_NMI */ /* XXX Giant */ |