Re: [PATCH/RFC] I/O-check interface for driver's error handling

From: Linus Torvalds <torvalds_at_osdl.org>
Date: 2005-03-02 06:37:33
On Tue, 1 Mar 2005, Linas Vepstas wrote:
> 
> > > - Additionally adds special token - abstract "iocookie" structure
> > >   to control/identifies/manage I/Os, by passing it to OS.
> > >   Actual type of "iocookie" could be arch-specific. Device drivers
> > >   could use the iocookie structure without knowing its detail.
> > 
> > Fine.
> 
> Do we really need a cookie?

I think you do.

That pair might have to disable interrupts (if there are any issues about
concurrent accesses through a shared error bus). In that case, the cooke 
might be the old "flags" value.

> > But many drivers don't need to save/restore interrupts around IO accesses.
> > I think defaulting these to disable and restore interrupts is a very bad idea.
> > They should probably be no-ops in the generic case.
> 
> Yes, they should be no-ops. save/resotre interrupts would be a bad idea.

But they may be part of that the architecture wants to do (imagine a 
spinlock protecting a sub-segment of a bus - you need to disable 
interrupts to avoid deadlocks).

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Mar 1 14:36:46 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:36 EST