Subject: Re: diff betw. bus_space_{read,write} and bus_space_{read,write}_stream?
To: Ken Nakata <kenn@synap.ne.jp>
From: Guenther Grau <Guenther.Grau@bk.bosch.de>
List: tech-kern
Date: 08/25/1998 12:00:21
Ken Nakata wrote:
> 
> On Tue, 25 Aug 1998 07:34:59 +0900, Ken Nakata wrote:
[...]
> OTOH, atari bus_space_tag_t is a huge struct full of pointers to
> bus_space_{read,write}* methods, and any bus_space_{read,write}* call
> always involves at least one level of memory indirect reference.
> Wouldn't you call this a performance hit, when compared to what we
> have in mac68k now?
> 
> Perhaps this cost is justified on atari since ataris have ISA bus, but
> AFAIK, IDE bus is _the_ _only_ LE bus present in any 68k Mac model,
> and I just don't think it's worth converting mac68k bus_space
> implementation into something like atari's only for using the MI wdc.c
> without modification.  I'm not sure what Scott (Reynolds, mac68k
> portmaster) would think, but at least for now, I opt for keeping a
> separate copy of wdc.c in arch/mac68k/dev.

First of all, IMHO, the Atari solution is the "correct" one, as
that is the way the bus_dma stuff was designed to work (that is,
if I understood it properly :-).
But in real life we might not always be able to or want (due
to various reasons) to implement the correct solution. In this 
case you claim that we shouldn't do so, because we have to expect
a performance hit. IMHO, you should implement the Atari solution
on the mac68k, which shouldn't be all that different, and do some
measurements with this version compared to a modified wdc
for the mac68k. Sometimes you cannot tell from just looking at the
code if something is a performance hit, or not. Thus real numbers
are a base to make decisions from :-)

Just my $0.02

  Guenther