summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2007-09-14 01:12:39 +0000
committerattilio <attilio@FreeBSD.org>2007-09-14 01:12:39 +0000
commit6160c569c25bb5edeb04670290b6d85e553ffc68 (patch)
tree1b903d6c895aa25503619439eafbb0c468480197 /sys/amd64/isa
parentc169939914349024893cf94d1d554d799e1c5aed (diff)
downloadFreeBSD-src-6160c569c25bb5edeb04670290b6d85e553ffc68.zip
FreeBSD-src-6160c569c25bb5edeb04670290b6d85e553ffc68.tar.gz
Currently the LO_NOPROFILE flag (which is masked on upper level code by
per-primitive macros like MTX_NOPROFILE, SX_NOPROFILE or RW_NOPROFILE) is not really honoured. In particular lock_profile_obtain_lock_failure() and lock_profile_obtain_lock_success() are naked respect this flag. The bug leads to locks marked with no-profiling to be profiled as well. In the case of the clock_lock, used by the timer i8254 this leads to unpredictable behaviour both on amd64 and ia32 (double faults panic, sudden reboots, etc.). The amd64 clock_lock is also not marked as not profilable as it should be. Fix these bugs adding proper checks in the lock profiling code and at clock_lock initialization time. i8254 bug pointed out by: kris Tested by: matteo, Giuseppe Cocomazzi <sbudella at libero dot it> Approved by: jeff (mentor) Approved by: re
Diffstat (limited to 'sys/amd64/isa')
-rw-r--r--sys/amd64/isa/clock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index 852cca1..0e5c8fc 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -565,7 +565,7 @@ void
i8254_init(void)
{
- mtx_init(&clock_lock, "clk", NULL, MTX_SPIN);
+ mtx_init(&clock_lock, "clk", NULL, MTX_SPIN | MTX_NOPROFILE);
set_timer_freq(timer_freq, hz);
}
OpenPOWER on IntegriCloud