The end of isa_readb() and friends
[Posted November 16, 2005 by corbet]
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)