PERFORCE change 30802 for review
John Baldwin
jhb at FreeBSD.org
Thu May 8 06:53:14 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=30802
Change 30802 by jhb at jhb_laptop on 2003/05/08 06:53:01
Use td_critnest instead of the spinlocks list since the spinlocks
list is only used if WITNESS is enabled.
Affected files ...
.. //depot/projects/smpng/sys/i386/i386/trap.c#56 edit
Differences ...
==== //depot/projects/smpng/sys/i386/i386/trap.c#56 (text+ko) ====
@@ -222,10 +222,10 @@
type);
/*
* Page faults need interrupts diasabled until later,
- * and we shouldn't enable interrupts while holding a
- * spin lock.
+ * and we shouldn't enable interrupts while in a
+ * critical section.
*/
- if (type != T_PAGEFLT && PCPU_GET(spinlocks) == NULL)
+ if (type != T_PAGEFLT && td->td_critnest == 0)
enable_intr();
}
}
@@ -240,7 +240,7 @@
* are finally ready to read %cr2 and then must
* reenable interrupts.
*
- * If we get a page fault while holding a spin lock, then
+ * If we get a page fault while in a critical section, then
* it is most likely a fatal kernel page fault. The kernel
* is already going to panic trying to get a sleep lock to
* do the VM lookup, so just consider it a fatal trap so the
@@ -248,7 +248,7 @@
* to the debugger.
*/
eva = rcr2();
- if (PCPU_GET(spinlocks) == NULL)
+ if (td->td_critnest == 0)
enable_intr();
else
trap_fatal(&frame, eva);
More information about the p4-projects
mailing list