Subject: Re: diff betw. bus_space_{read,write} and bus_space_{read,write}_stream?
To: Ken Nakata <kenn@synap.ne.jp>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 08/26/1998 22:03:52
On Aug 25, Ken Nakata wrote
> It's much simpler than atari's, and if you look at this, you'll notice
> tag isn't even used at all.
> 
> 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?

Yes. Sharing drivers always inplies a small performance hit, but I really
believe it's worth it. 

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

Don't some macs have a PCMCIA bus ? I think it's LE too.
Couln't bus.h make some guess about what kind of CPU/machine we're compiling
a kernel for, and use the function pointer or the inlined version as
appropriate ?

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

And also a separate copy of wd.c. And any change made to atapi*.c by non-mac
developers may break atapi on mac.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--