Re: dual head r128

From: Geert Uytterhoeven (
Date: Fri Oct 13 2000 - 16:07:43 EST

On Fri, 13 Oct 2000, Benjamin Herrenschmidt wrote:
> >Or, more general, treat [PCI] I/O space similar to [PCI] memory space. Just
> >like we must use ioremap() for memory space:
> >
> > cookie = ioremap(memory_space_address, size);
> > x = readb(cookie+offset);
> >
> >we could have ioportremap() for I/O space:
> >
> > cookie = ioportremap(io_space_address, size);
> > x = inb(cookie+offset);
> >
> >On PC, ioportremap(x) would evaluate to (x). On other platforms, we can do
> >whatever we want.
> That would make us fall in the same trap as we are now with multiple IO
> busses having overlapping IO mappings. (Basically, every IO bus on some
> multi-bus systems have 0->64k IO range). ioportremap() cannot "know" on
> which bus the device is, except if we also pass the pci_dev* parameter
> (and NULL for ISA).

But you can fixup all pci_dev's so bus 0 takes 0x00000-0x0fffff, bus 1 takes
0x10000-0x1ffff, and so on. ioportremap() finds out the bus by looking at the

I/O space is not limited to 64 kB on non-ia32, we can use the full size of an
unsigned long.

Legacy I/O mappings (`I have legacy lp0 on bus 0 and legacy lp1 on bus 1') can
be sorted out in ioportremap() as well.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds

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

This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:26 EST