Flash chip locking

David Woodhouse dwmw2 at infradead.org
Sat Nov 4 14:26:50 EST 2000


On Thu, 12 Oct 2000, Alice Hennessy wrote:

> Was the  "has the erase finished yet?" timer the only reason for using
> spin_lock_bh instead of spin_lock?   Since the timer isn't implemented yet,
> spin_lock can be used at the moment, correct?   I'm experimenting with the
> driver in an environment that can  only tolerate disabling the bottom half for
> very brief periods.

Actually, even in the case where the timer _may_ be used, it's safe to
check whether a timer is _actually_ pending and only disable bottom halves
if it is. Because you hold the spinlock you know no other routine is going
to set a timer until you've finished.

-- 
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list