From owner-cvs-src@FreeBSD.ORG Wed Jun 29 13:47:33 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C956216A41C for ; Wed, 29 Jun 2005 13:47:33 +0000 (GMT) (envelope-from ups@freebsd.org) Received: from smtp.speedfactory.net (smtp.speedfactory.net [66.23.216.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32C9B43D58 for ; Wed, 29 Jun 2005 13:47:33 +0000 (GMT) (envelope-from ups@freebsd.org) Received: (qmail 20789 invoked by uid 210); 29 Jun 2005 13:48:21 +0000 Received: from 66.23.216.49 by talon (envelope-from , uid 201) with qmail-scanner-1.25st (clamdscan: 0.85.1/959. spamassassin: 3.0.2. perlscan: 1.25st. Clear:RC:1(66.23.216.49):. Processed in 0.378425 secs); 29 Jun 2005 13:48:21 -0000 X-Qmail-Scanner-Mail-From: ups@freebsd.org via talon X-Qmail-Scanner: 1.25st (Clear:RC:1(66.23.216.49):. Processed in 0.378425 secs Process 20768) Received: from 66-23-216-49.clients.speedfactory.net (HELO palm.tree.com) (66.23.216.49) by smtp.speedfactory.net with AES256-SHA encrypted SMTP; 29 Jun 2005 13:48:21 +0000 Received: from [127.0.0.1] (ups@localhost.tree.com [127.0.0.1]) by palm.tree.com (8.12.10/8.12.10) with ESMTP id j5TDl9Ll011104; Wed, 29 Jun 2005 09:47:29 -0400 (EDT) (envelope-from ups@freebsd.org) From: Stephan Uphoff To: Bruce Evans In-Reply-To: <20050627050618.W34733@delplex.bde.org> References: <200506252214.j5PMEgip000380@repoman.freebsd.org> <7c65ef6b909f86fa7f5a8aa041773a72@xcllnt.net> <20050627050618.W34733@delplex.bde.org> Content-Type: text/plain Message-Id: <1120052829.77984.17793.camel@palm> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 29 Jun 2005 09:47:09 -0400 Content-Transfer-Encoding: 7bit Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Marcel Moolenaar Subject: Re: cvs commit: src/sys/i386/i386 trap.c src/sys/amd64/amd64 trap.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2005 13:47:33 -0000 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