Re: Accessing MMIO PCI space - crossplatform (fwd)

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Sun, 15 Nov 1998 09:48:00 +0000


On Sat, Nov 14, 1998 at 09:31:03AM +0100, Gerard Roudier wrote:
> The PCI recommendation is to have a flat model with unified memory/BUS
> physical addressing from all parts (I mean CPUs and BUSes). It seems
> that when it is easy to make things simple and hard to make them complex,
> architecture designers did prefer the latter.

See David Miller's note about Sparc64 having to address 100s of PCI
buses simultaneously.

> PS: my prefered way to make things portable is to use '#if' (preprocessed)
> contructs and not 'if' (run time) contructs. Any bloat or overhead due to
> portability issues is poor design in my opinion. I would prefer to use non
> portable code rather than to have code that checks at run time if my
> system is something different from what it actually is. BTW, I understand
> portability issues since my official work is to develop such kind of
> applications.

if (1) and if (0) optimise very well, so there is no difference from #if
if the config parameters are constants for some architecture.

#if does not support those architectures that _need_ run time
configuration.

So if() is required in general, and because we trust the compiler there's
no need to wrap #if around if().

-- Jamie

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