On Fri, 1 Jun 2001, Jeff Garzik wrote:

> Tim Hockin wrote:
> >  spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED;
> > +spinlock_t sym53c8xx_host_lock = SPIN_LOCK_UNLOCKED;
> >  #define        NCR_LOCK_DRIVER(flags)     spin_lock_irqsave(&sym53c8xx_lock, 
>flags)
> >  #define        NCR_UNLOCK_DRIVER(flags)   
>spin_unlock_irqrestore(&sym53c8xx_lock,flags)
> > +#define        NCR_LOCK_HOSTS(flags)     spin_lock_irqsave(&sym53c8xx_host_lock, 
>flags)
> > +#define        NCR_UNLOCK_HOSTS(flags)   
>spin_unlock_irqrestore(&sym53c8xx_host_lock,flags)
> > 
> >  #define NCR_INIT_LOCK_NCB(np)      spin_lock_init(&np->smp_lock);
> >  #define        NCR_LOCK_NCB(np, flags)    spin_lock_irqsave(&np->smp_lock, flags)
> > @@ -650,6 +655,8 @@
> > 
> >  #define        NCR_LOCK_DRIVER(flags)     do { save_flags(flags); cli(); } while 
>(0)
> >  #define        NCR_UNLOCK_DRIVER(flags)   do { restore_flags(flags); } while (0)
> > +#define        NCR_LOCK_HOSTS(flags)     do { save_flags(flags); cli(); } while 
>(0)
> > +#define        NCR_UNLOCK_HOSTS(flags)   do { restore_flags(flags); } while (0)
> > 
> >  #define        NCR_INIT_LOCK_NCB(np)      do { } while (0)
> >  #define        NCR_LOCK_NCB(np, flags)    do { save_flags(flags); cli(); } while 
>(0)
> > @@ -695,7 +702,7 @@
> 
> so, this driver is mixed spinlocks and save/restore_flags?  Any chance
> this can be converted to all spinlocks?

This has been done years ago for linux 2.1.93.
The save/restore flags locking methods are conditionnaly compiled for
earlier kernels. This makes the corresponding code very probably quite
useless nowadays and I should remove it from the source.

  Gérard.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to