cvs commit: src/sys/i386/i386 trap.c src/sys/amd64/amd64 trap.c

Stephan Uphoff ups at freebsd.org
Wed Jun 29 13:47:33 GMT 2005


On Sun, 2005-06-26 at 15:44, Bruce Evans wrote:
> On Sat, 25 Jun 2005, Marcel Moolenaar wrote:
> 
> > On Jun 25, 2005, at 3:14 PM, Stephan Uphoff wrote:
> >
> >> ups         2005-06-25 22:14:42 UTC
> >> 
> >>   FreeBSD src repository
> >> 
> >>   Modified files:
> >>     sys/i386/i386        trap.c
> >>     sys/amd64/amd64      trap.c
> >>   Log:
> >>   Disable the interrupts in trap_fatal before calling kdb_trap.
> >>   (required now that critical sections no longer block interrupts)
> >
> > Why does this only apply to i386 and amd64?
> 
> Because it is a wrong fix.  Many arches used to hard-disable interrupts
> in their MD kdb_trap(), but this rotted to critical_enter() in rev.1.1
> of subr_kdb.c.  "Many arches":
> 
> alpha: used intr_disable(), but misplaced it so that it didn't protect
>         the state global
> amd64: used disable_intr() correctly
> arm: used only splhigh()
> i386: used disable_intr() correctly
> ia64: used intr_disable() correctly
> sparc64: no locking except that given by cndbctl()
> 
> Loss of cndbctl() for all arches in rev.1.1 of subr_kdb.c is more
> serious.  critical_enter() blocks most things, but calling cndbctl()
> is critical for the console drivers that depend on it to keep track
> of when console i/o is done from within ddb.  Mainly syscons depends
> on it.  Calls to cndbctl() used to only be missing for arm.
> 
> Bruce
> 

Hi Bruce,

this is just a quick fix to get basic debugging capabilities back for
some common environments. I plan to migrate parts or all of kdb_trap
back to MD code to deal with SMP race conditions. Hopefully I can also
address the console driver problems at that time.

Stephan



More information about the cvs-src mailing list