summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2002-03-30 11:14:52 +0000
committernyan <nyan@FreeBSD.org>2002-03-30 11:14:52 +0000
commit3ef5867e0b39050f8fd12ca962467d8d1c30263c (patch)
treeeff26fec92fcc82655a273b060f904531d204488 /sys/pc98
parentfab7c9a460dca3931a72b87d87fb81a7e5e80a02 (diff)
downloadFreeBSD-src-3ef5867e0b39050f8fd12ca962467d8d1c30263c.zip
FreeBSD-src-3ef5867e0b39050f8fd12ca962467d8d1c30263c.tar.gz
MFi386: revision 1.506.
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/i386/machdep.c13
-rw-r--r--sys/pc98/pc98/machdep.c13
2 files changed, 18 insertions, 8 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index ed253cb..ddd958c 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -815,9 +815,14 @@ cpu_idle(void)
#ifndef SMP
if (cpu_idle_hlt) {
disable_intr();
- if (procrunnable()) {
+ if (procrunnable()) {
enable_intr();
} else {
+ /*
+ * we must absolutely guarentee that hlt is the
+ * absolute next instruction after sti or we
+ * introduce a timing window.
+ */
__asm __volatile("sti; hlt");
}
}
@@ -1758,9 +1763,9 @@ init386(first)
* Initialize mutexes.
*
* icu_lock: in order to allow an interrupt to occur in a critical
- * section, to set pcpu->ipending (etc...) properly, we
- * must be able to get the icu lock, so it can't be under
- * witness.
+ * section, to set pcpu->ipending (etc...) properly, we
+ * must be able to get the icu lock, so it can't be
+ * under witness.
*/
mtx_init(&Giant, "Giant", MTX_DEF | MTX_RECURSE);
mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_RECURSE);
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index ed253cb..ddd958c 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -815,9 +815,14 @@ cpu_idle(void)
#ifndef SMP
if (cpu_idle_hlt) {
disable_intr();
- if (procrunnable()) {
+ if (procrunnable()) {
enable_intr();
} else {
+ /*
+ * we must absolutely guarentee that hlt is the
+ * absolute next instruction after sti or we
+ * introduce a timing window.
+ */
__asm __volatile("sti; hlt");
}
}
@@ -1758,9 +1763,9 @@ init386(first)
* Initialize mutexes.
*
* icu_lock: in order to allow an interrupt to occur in a critical
- * section, to set pcpu->ipending (etc...) properly, we
- * must be able to get the icu lock, so it can't be under
- * witness.
+ * section, to set pcpu->ipending (etc...) properly, we
+ * must be able to get the icu lock, so it can't be
+ * under witness.
*/
mtx_init(&Giant, "Giant", MTX_DEF | MTX_RECURSE);
mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_RECURSE);
OpenPOWER on IntegriCloud