From owner-cvs-all@FreeBSD.ORG Mon Jul 24 22:38:40 2006 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AEAD016A4DE; Mon, 24 Jul 2006 22:38:40 +0000 (UTC) (envelope-from john@baldwin.cx) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2636343D45; Mon, 24 Jul 2006 22:38:40 +0000 (GMT) (envelope-from john@baldwin.cx) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6OMcc3U029334; Mon, 24 Jul 2006 18:38:38 -0400 (EDT) (envelope-from john@baldwin.cx) From: John Baldwin To: Marcel Moolenaar Date: Mon, 24 Jul 2006 18:38:29 -0400 User-Agent: KMail/1.9.1 References: <200607242225.k6OMPG61048242@repoman.freebsd.org> In-Reply-To: <200607242225.k6OMPG61048242@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607241838.29930.john@baldwin.cx> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 24 Jul 2006 18:38:39 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1616/Mon Jul 24 13:49:29 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/scc scc_core.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2006 22:38:40 -0000 On Monday 24 July 2006 18:25, Marcel Moolenaar wrote: > marcel 2006-07-24 22:25:16 UTC > > FreeBSD src repository > > Modified files: > sys/dev/scc scc_core.c > Log: > If we have multiple interrupt resources, like for Z8530 clones on the > mac-io bus, we cannot setup FAST interrupt handlers. This because we > use spinlocks to protect the hardware and all interrupt resources are > assigned the same interrupt handler. When the interrupt handler is > invoked for interrupt X, it could be preempted for interrupt Y while > it was holding the lock (where X and Y are the interrupt resources > corresponding a single instance of this driver). This is a deadlock. > By only using a MPSAFE handler in that case we prevent preemption. Umm, if you have interrupts preempting a spin lock you are going to have a lot more problems. :( spinlock_enter() is supposed to either block or defer any interrupts that could try to acquire a spin lock or interfere with a held spin lock until spinlock_exit(). -- John Baldwin