diff options
author | imp <imp@FreeBSD.org> | 2013-02-21 07:16:40 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2013-02-21 07:16:40 +0000 |
commit | fa7b0b1bddf36bab33aca0d63983e14764464a5d (patch) | |
tree | bec7ab518c4fc9d4214b18fe214e133e136db57c /sys/i386/isa | |
parent | 0e80cda705594a7a322a77d742acee43e2d940da (diff) | |
download | FreeBSD-src-fa7b0b1bddf36bab33aca0d63983e14764464a5d.zip FreeBSD-src-fa7b0b1bddf36bab33aca0d63983e14764464a5d.tar.gz |
Locking for todr got pushed down into inittodr and the client
libraries it calls (although some might not be doing it right). We are
serialized right now by giant as well. This means the splsoftclock are
now an anachronism that has no benefit, even marking where locking
needs to happen. Remove them.
Diffstat (limited to 'sys/i386/isa')
-rw-r--r-- | sys/i386/isa/pmtimer.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/i386/isa/pmtimer.c b/sys/i386/isa/pmtimer.c index d8e6d1f..b5a0302 100644 --- a/sys/i386/isa/pmtimer.c +++ b/sys/i386/isa/pmtimer.c @@ -82,26 +82,21 @@ static struct timeval diff_time; static int pmtimer_suspend(device_t dev) { - int pl; - pl = splsoftclock(); microtime(&diff_time); inittodr(0); microtime(&suspend_time); timevalsub(&diff_time, &suspend_time); - splx(pl); return (0); } static int pmtimer_resume(device_t dev) { - int pl; u_int second, minute, hour; struct timeval resume_time, tmp_time; /* modified for adjkerntz */ - pl = splsoftclock(); timer_restore(); /* restore the all timers */ inittodr(0); /* adjust time to RTC */ microtime(&resume_time); @@ -118,16 +113,13 @@ pmtimer_resume(device_t dev) timevalsub(&resume_time, &suspend_time); /* Fixup the calltodo list with the delta time. */ adjust_timeout_calltodo(&resume_time); -#endif /* PMTIMER_FIXUP_CALLTODOK */ - splx(pl); -#ifndef PMTIMER_FIXUP_CALLTODO - second = resume_time.tv_sec - suspend_time.tv_sec; -#else /* PMTIMER_FIXUP_CALLTODO */ /* * We've already calculated resume_time to be the delta between * the suspend and the resume. */ second = resume_time.tv_sec; +#else /* !PMTIMER_FIXUP_CALLTODO */ + second = resume_time.tv_sec - suspend_time.tv_sec; #endif /* PMTIMER_FIXUP_CALLTODO */ hour = second / 3600; second %= 3600; |