From owner-cvs-all@FreeBSD.ORG Mon Jul 24 23:37:45 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 8732516A4DE; Mon, 24 Jul 2006 23:37:45 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 341C143D46; Mon, 24 Jul 2006 23:37:44 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.5.252] (dhcp52.wlan.xcllnt.net [192.168.5.252]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k6ONbaYJ009207; Mon, 24 Jul 2006 16:37:36 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <200607241838.29930.john@baldwin.cx> References: <200607242225.k6OMPG61048242@repoman.freebsd.org> <200607241838.29930.john@baldwin.cx> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Mon, 24 Jul 2006 16:37:32 -0700 To: John Baldwin X-Mailer: Apple Mail (2.752.2) Cc: cvs-src@freebsd.org, Marcel Moolenaar , 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 23:37:45 -0000 On Jul 24, 2006, at 3:38 PM, John Baldwin wrote: > 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(). Doh! You're right. I think I got confused with critical regions. Thanks for pointing it out. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net