[openib-general] Suggestions for how to remove bus_to_virt()

Stefan Richter stefanr at s5r6.in-berlin.de
Thu Jul 13 00:45:53 PDT 2006


David Miller wrote:
> If you need device level DMA mapping semantics, create them for your
> device type.  This is what USB does, btw.

Ralph,
two other examples where drivers provide some sort of address lookup are:

 - drivers/ieee1394/dma.[hc]
   AFAIK this deals with housekeeping of ringbuffers as used by
   1394 controllers for isochronous transmit and receive. Users of
   this little API are dv1394, video1394, ohci1394.

 - patch "dc395x: dynamically map scatter-gather for PIO" by
   Guennadi Liakhovetski,
http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cdb8c2a6d848deb9eeefffff42974478fbb51b8c
   This mapping is not specific to SCSI. The user is a driver which
   mixes PIO and DMA.

I don't know if these have any similarity to your requirements though.

(I too need to come up with either a portable replacement of bus_to_virt
or with a fundamentally different implementation but haven't started my
project yet. This occurrence of bus_to_virt is in drivers/ieee1394/sbp2
but #ifdef'd out by default.)
-- 
Stefan Richter
-=====-=-==- -=== -==--
http://arcgraph.de/sr/




More information about the general mailing list