On Tue, Jun 10, 2003 at 06:20:29PM +0200, Andi Kleen wrote:
Can't you just wrap it in a few macros and offer a config for those
who want the best performance and a runtime test for the others?
Then switch between PIO and mmio dynamically.
Even runtime test should be pretty painless these days, the CPU normally
can execute hundreds or even thousands of tests in the time it takes to
wait for an mmio or even PIO.
I prefer a compile-time test. But yes, this is what several other
net drivers do: offer a config option for MMIO (or PIO), and the
default is MMIO unless that is known to be unsafe on certain boards
(which, unfortunately, it is).
Jeff