lkml.org 
[lkml]   [2005]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/RFC] I/O-check interface for driver's error handling
On Tue, Mar 01, 2005 at 05:33:48PM +0900, Hidetoshi Seto wrote:
> Today's patch is 3rd one - iochk_clear/read() interface.
> - This also adds pair-interface, but not to sandwich only readX().
> Depends on platform, starting with ioreadX(), inX(), writeX()
> if possible... and so on could be target of error checking.

I'd prefer to see it as ioerr_clear(), ioerr_read() ...

> - 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.

> If arch doesn't(or cannot) have its io-checking strategy, these
> interfaces could be used as a replacement of local_irq_save/restore
> pair. Therefore, driver maintainer can write their driver code with
> these interfaces for all arch, even where checking is not implemented.

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.

--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.906 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site