From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux-kernel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Subject: How to replace bus_to_virt()?
Date: Sun, 30 Apr 2006 16:52:37 +0200 [thread overview]
Message-ID: <4454CF35.7010803@s5r6.in-berlin.de> (raw)
Hi all,
is there a *direct* future-proof replacement for bus_to_virt()?
It appears there are already architectures which do not define a
bus_to_virt() funtion or macro. If there isn't a direct replacement, is
there at least a way to detect at compile time whether bus_to_virt() exists?
I am asking because the sbp2 driver uses bus_to_virt() if
CONFIG_IEEE1394_SBP2_PHYS_DMA=y. I would like to replace this option by
an automatic detection when the respective code in sbp2 is actually
required.
The current implementation is this: Sbp2 uses bus_to_virt() to map from
1394 bus addresses (which are currently identical to local host bus
addresses) to virtual addresses. These addresses are supplied by SBP-2
target devices and point to *arbitrary* locations within buffers. These
buffers are supplied by the SCSI subsystem/ block IO subsystem. That is,
sbp2 has no influence on the location of the buffers, nor has it
influence on the location of the chunk of data which an SBP-2 target is
reading or writing at a particular moment. But thanks to bus_to_virt(),
sbp2 does not need to know which SCSI command buffer (and to which
scatter/gather element in the buffer) a particular data transfer belongs to.
From what I found out so far, I am afraid I have to implement a totally
different address mapping scheme for the cases where physical DMA is not
available; i.e. a scheme that enables sbp2 to look up the s/g element to
which a transfer is directed, based on the 1394 bus address of the transfer.
--
Stefan Richter
-=====-=-==- -=-- ====-
http://arcgraph.de/sr/
next reply other threads:[~2006-04-30 14:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-30 14:52 Stefan Richter [this message]
2006-04-30 15:50 ` How to replace bus_to_virt()? Arjan van de Ven
2006-04-30 23:40 ` Stefan Richter
2006-05-03 19:11 ` Guennadi Liakhovetski
2006-05-03 20:35 ` linux-os (Dick Johnson)
2006-05-03 21:01 ` Arjan van de Ven
2006-05-01 12:30 ` Segher Boessenkool
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4454CF35.7010803@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox