Re: [RFC] I/O Access Abstractions

From: Benjamin Herrenschmidt (
Date: Mon Jul 02 2001 - 17:08:48 EST

>> > Last time I checked, ioremap didn't work for inb() and outb().
>> It should :)
>it doesnt need to.
>pci_find_device returns the io address and can return a cookie, ditto
>isapnp etc

Yes, but doing that require 2 annoying things:

 - Parsing of this cookie on each inx/outx access, which can
take a bit of time (typically looking up the host bridge)

 - On machines with PIO mapped in CPU mem space and several
(or large) IO regions, they must all be mapped all the time,
which is a waste of kernel virtual space.

Why not, at least for 2.5, define a kind of pioremap that
would be the equivalent of ioremap for PIO ?

In fact, I'd rather have all this abstracted in a

ioremap_resource(struct resource *, int flags)
iounmap_resource(struct resource *)

("flags" is just an idea that could be used to pass things
like specific caching attributes, or whatever makes sense to
a given arch).

The distinction between inx/oux & readx/writex would still
make sense at least for x86.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jul 07 2001 - 21:00:10 EST