Bottom halves being disabled

Linh Dang linhd at nortelnetworks.com
Tue Aug 24 22:36:28 EDT 2004


David Woodhouse <dwmw2 at infradead.org> wrote:

> On Tue, 2004-08-24 at 05:09 -0700, Ed Co wrote:
>> Hi All,
>>
>> In the NOR driver code, the spin locks are acquired
>> everywhere with bottom halves disabled using the
>> spin_lock_bh() API. My doubt is why are the bottom
>> halves disabled? (Doesn't that add to the real time
>> latency on the system!)
>>
>> Hoping someone would clear the doubt
>
> Because we intend the erase completion to be asynchronous, hence we
> lock against the timers which may one day check for it. There's no
> real reason we couldn't switch to spin_lock() for now.

Is it safe to convert those spin_locks to mutexes?

-- 
Linh Dang




More information about the linux-mtd mailing list