Re: [PATCH] add legacy I/O and memory access routines to /proc/bus/pci API

Jesse Barnes
2004-12-15T03:06:26Z

On Tuesday, December 14, 2004 4:11 pm, Jesse Barnes wrote:
> > In this example, the particular device ("01/01.0") you open
> > makes no difference, right? The I/O port routing is determined
> > by the chipset, not by which /proc/bus/pci/... file you open.
>
> But the chipset can be programmed to route things correctly or remap the
> correct legacy I/O port domain in the callback routine.

I should clarify here, the device *does* matter, since the legacy I/O port
space mapping will point at different addresses depending on the device.
Generally, devices on the same bus will get the same address, but two devices
on different busses will have different addresses mapped (at least on Altix).
In your case, where you can route I/O ports to arbitrary busses, you could do
the routing at the time of the call and return -EBUSY if another device was
already using the route and hadn't released it yet.

Jesse