Date: Mon, 15 Mar 2004 11:47:41 -0500 From: John Baldwin <jhb@FreeBSD.org> To: Juli Mallett <jmallett@FreeBSD.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 48876 for review Message-ID: <200403151147.41616.jhb@FreeBSD.org> In-Reply-To: <200403130837.i2D8b9wv054555@repoman.freebsd.org> References: <200403130837.i2D8b9wv054555@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 13 March 2004 03:37 am, Juli Mallett wrote: > ==== //depot/projects/mips/sys/mips/mips/trap.c#17 (text+ko) ==== > > @@ -40,6 +40,7 @@ > #include <machine/pte.h> > #include <machine/tlb.h> > #include <machine/trap.h> > +#include <machine/hwfunc.h> > > #ifdef DDB > #include <machine/db_machdep.h> > @@ -108,6 +109,12 @@ > tlb_modified(badvaddr); > platform_trap_exit(); > return; > + case TrInt: > + platform_trap_exit(); > + atomic_add_int(&curthread->td_intr_nesting_level, 1); > + platform_intr(tf); > + atomic_subtract_int(&curthread->td_intr_nesting_level, 1); > + return; > default: > /* Fatal! */ > break; Note that if interrupts are disabled on the CPU when this is called, you don't need to use atomic ops to dink with the nesting level. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403151147.41616.jhb>