Date: Thu, 8 May 2003 06:53:11 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 30802 for review Message-ID: <200305081353.h48DrBi3046865@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=30802 Change 30802 by jhb@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305081353.h48DrBi3046865>