Re: New resources - pls, explain :-(

Linus Torvalds (torvalds@transmeta.com)
Sat, 14 Aug 1999 16:36:03 -0700 (PDT)


On Sat, 14 Aug 1999, Jeff Garzik wrote:
>
> Since decisions are getting made about this stuff, what is a coherent
> strategy for bus-specific addressing? ie. I want to ioremap() PCI
> device A on bus 1 at 0x0C000000, and also ioremap() PCI device B on bus
> 2 at 0x0C000000.

The PCI bus needs to be encoded in the PCI address some way. So far this
has really been an issue only on 64-bit architectures (alpha and
ultrasparc), and then the PCI address just encodes the bus number
somewhere in the upper bits - and ioremap() just gets it from there.
That's usually how the things are mapped into the physical address space
of the CPU anyway, so often ioremap() doesn't even need to know about bus
numbers at all.

If this really is starting to happen on a 32-bit architecture, then the
PCI buses have better not have any overlap anyway (on a PC, for example,
if you'd have something like the above the CPU would be terminally
confused about the addressing anyway - which device would it be talking to
when it talkes to physical address 0x0c000000?).

So think of it as a flat address space - with the buses separated from
each other by some magic base address.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/