Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2006 16:37:32 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        John Baldwin <john@baldwin.cx>
Cc:        cvs-src@freebsd.org, Marcel Moolenaar <marcel@freebsd.org>, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/dev/scc scc_core.c
Message-ID:  <A9280DAF-A999-4B8A-B033-CAB9CA445E23@xcllnt.net>
In-Reply-To: <200607241838.29930.john@baldwin.cx>
References:  <200607242225.k6OMPG61048242@repoman.freebsd.org> <200607241838.29930.john@baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help

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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A9280DAF-A999-4B8A-B033-CAB9CA445E23>