lkml.org 
[lkml]   [1999]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: New resources - pls, explain :-(
Alan Cox wrote:
> > right thing" for that bus. One could add "bigendian_writel()" and
> > "littleendian_writel()" to satisfy the Linus constraint of making
> > unusual usage of writel() obvious.

> So every I/O has an if in it. Nothing like stalling the pipeline before we
> probably stall on I/O writes to make things twice as painful.

Various implementations of writel() do stuff to stall the pipeline a bit
anyway. It's really a convenience/speed tradeoff. IMHO writel() should
continue to "do the right thing" as it currently does, regardless of its
bus, while allowing saavy driver writers to employ BUS_writel() if they
so desire.

My main motivation is keeping the codebase the same across multiple
buses. The 'if' has to occur somewhere, if your driver supports
multiple buses. I would rather have the ifs in a common place,
writel(), to avoid

void vga_mm_wcrt (caddr_t vga_base, unsigned char reg, unsigned char
val)
{
if (zorro_bus) {
zorro_writeb
zorro_writeb
} else if (pci_bus) {
...use pci_writeb to duplicate above logic...
} else if (sbus) {
...use sbus_writeb to duplicate above logic...
}
}
--
Entropy requires no maintenance.
-- Markoff Chaney

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

\
 
 \ /
  Last update: 2005-03-22 13:53    [from the cache]
©2003-2011 Jasper Spaans