Re: New resources - pls, explain :-(

Jes Sorensen (Jes.Sorensen@cern.ch)
16 Aug 1999 22:08:31 +0200


>>>>> "Peter" == Peter Desnoyers <pjd@fred001.dynip.com> writes:

Peter> This has the nice feature that I can write a driver for a
Peter> normal device on a little-endian machine without any #if-endian
Peter> nonsense, and then recompile and run it on a big-endian
Peter> machine. Except that I can already do that today - the only
Peter> change this makes is to bring native bigendian hardware
Peter> (oddball PCI cards, NuBus, SBus) into the readl/writel fold, a
Peter> task which might be of more importance if people were making
Peter> more new cards for them...

Well you will still need some ifdef's since readl/writel are only
defined for ISA/PCI style memory mappings - you should not use them on
NuBus, SBUS or Zorro mapped memory.

Peter> (which brings up my confusion over Linus' definition of
Peter> "PCI-like". In prior lives I worked on 68K systems, and now
Peter> I'm working on a PCI card that has only memory regions, not I/O
Peter> ones, so I guess I tend to think of all I/O as memory-mapped,
Peter> with in/out defining a weird separate address space. I have a
Peter> hard time figuring out a definition of PCI-like that allows my
Peter> card and PCI on an UltraSparc but excludes NuBus and SBus.)

Actually it is not very hard to imagine, some busses a cache coherent,
some are not. Some busses do not provide a linear mapping of the
memory even when it is memory mapped, the sparse memory found in some
Alphas is an example of this. So basically you cannot expect PCI
shared memory to have the same access semantics as NuBus memory. In
this case you will always end up with #ifdef's in your driver.

Jes

-
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/