Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jun 2005 09:47:09 -0400
From:      Stephan Uphoff <ups@freebsd.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Marcel Moolenaar <marcel@xcllnt.net>
Subject:   Re: cvs commit: src/sys/i386/i386 trap.c src/sys/amd64/amd64 trap.c
Message-ID:  <1120052829.77984.17793.camel@palm>
In-Reply-To: <20050627050618.W34733@delplex.bde.org>
References:  <200506252214.j5PMEgip000380@repoman.freebsd.org> <7c65ef6b909f86fa7f5a8aa041773a72@xcllnt.net> <20050627050618.W34733@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1120052829.77984.17793.camel>