LWN.net Logo

The end of isa_readb() and friends

The kernel has long had a series of functions which read and write memory locations in the legacy ISA memory range. These functions, with names like isa_readb(), require no special preparation to use, and they only work in the ISA hole. They also have been obsolete and deprecated for quite some time.

Recently, there has been an effort to finally get rid of isa_readb() and friends. To that end, Al Viro has posted a set of "isaectomy" patches which fix up the remaining callers (they are made to use ioremap() and the not quite as obsolete readb() family of functions) so that the old stuff can be deleted. One would think that this work would be uncontroversial, but Linus, it turns out, is unconvinced:

Hmm.. I actually believe that the isa_read() functions are more portable and easier to use than ioremap().

The reason? A platform will always know where any legacy ISA bus resides, while the "ioremap()" thing will depend on platform PCI code to have set the right offsets (and thus the resource addresses) for whatever bus the PCI device is on.

The fact is, however, that very little in-tree code still uses these functions. They are a deprecated interface to a very old and obsolete hardware standard, and they have few defenders. So anybody maintaining out-of-tree which still uses these functions might want to take warning: they probably will not stay around for much longer.


(Log in to post comments)

The end of isa_readb() and friends

Posted Apr 25, 2007 14:26 UTC (Wed) by amarchini (guest, #44892) [Link]

The embedded community may want to comment here. There is a large base of PC/104 devices out there that still may want to use these functions. They pose no problem to anything else that I am aware of, why not leave them in?

Tony

Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds