Re: pre2.0.31-2

Jes Degn Soerensen (jds@kom.auc.dk)
06 Jun 1997 11:13:15 +0200


>>>>> "David" == David S Miller <davem@jenolan.rutgers.edu> writes:

David> I have solved this entirely on the Sparc, and it touches none
David> of the generic code, I have been able to handle this on the
David> MIPS with the W7000 driver because the architecture specific
David> stuff is in seperate .c files and I can play with caches in
David> there and nobody else pays this price or even needs to know
David> about the issue.

Do you mean the wd7000 driver and not the wd33c93 driver? The wd7000
is an ISA/EISA/MCA bus SCSI controller with a wd33c93 and a Z80
processor according to the comments in the driver, and if I remember
correct the Z80 handles all the access to the wd33c93.

However when I started reading your posting I kinda wanted to disagree
with you, but just as I was about to start flaming I realized that you
were actually right (darn darn darn ;).

We have used this approach for the Amiga SCSI drivers for quite a
while and it works well. In fact we used the same approach when we
`stole' the Sparc ESP SCSI driver for a series of Amiga 53c9x based
SCSI controllers. If people want to see how to do this the Right
Way(Tm) take a look at wd33c93.[ch] (the basic driver) and a2091.[ch],
gvp11.[ch] and a3000.[ch].

But! Yeah here it comes, I do think it would be a good idea to add an
extra parameter to vremap() which specifies the cache-mode that is
supposed to be used for the mapping. We do need this for the m68k and
so we currently use our own kernel_map() rather than vremap(), and I
think some other architectures might need it as well.

I would like to have a function with the same name for all archs so
one wont have to dig half way through the kernel to figure out what is
going on in some other driver when you want to clone it. Architectures
which do not need this can just ignore the extra parameter, but maybe
this really indicates that vremap() is really an architecture specific
thing and should be moved to arch/foo/mm/?

Jes

PS: Besides vremap() is really one of those functions where you cannot
figure out from its name what it is actually doing, so maybe a
renaming was a good idea as well.