From: James Bottomley <James.Bottomley@SteelEye.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Jens Axboe <axboe@suse.de>, Christoph Hellwig <hch@infradead.org>,
Matthew Wilcox <matthew@wil.cx>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
Kurt Garloff <garloff@suse.de>
Subject: Re: [PATCH] dc395x: Fix support for highmem
Date: Sun, 24 Apr 2005 18:11:58 -0400 [thread overview]
Message-ID: <1114380718.4786.10.camel@mulgrave> (raw)
In-Reply-To: <Pine.LNX.4.60.0504240212090.13715@poirot.grange>
On Sun, 2005-04-24 at 02:22 +0200, Guennadi Liakhovetski wrote:
> Thanks for the info. Let me see, if I got you right. Say, we've got an sg
> with 2 elements: first 2 * PAGE_SIZE long, offset 0, pointing to page #0,
> second PAGE_SIZE long, offset 0, page #3. Say, dma_map_sg returned 1, so,
> it mapped all those 3 (physically discontiguous) pages to a contiguous bus
> address range. And now sg_dma_len() returns 3 * PAGE_SIZE.
Yes, that's true.
> But, I hope,
> the .page, .length, and .offset elements stayed unchanged, so, one can
> still walk elements 0 and 1, calculating a sum of sg[i].length and thus
> arrive to the required page, right?
This, I'm not entirely sure about. There are some weird iommu mapping
implementations out there. The only absolute requirement is that the
map_sg unmap_sg map_sg actually work. There was some debate over
whether unmap_sg was supposed to return the sg list to its original
form, but x86_64 got beaten up in the argument, so this is true too.
So ... I think the answer to your question is "yes", at least for all
the iommu implementations I know about. However, nothing in the
published API actually requires this.
What I think all this means is that you can get away with what you're
proposing. However, the proper route would be to unmap the sglist
before you start feeding the leftovers via pio.
James
next prev parent reply other threads:[~2005-04-24 23:26 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200503160209.j2G29cAf010870@hera.kernel.org>
2005-03-16 7:58 ` [PATCH] dc395x: Fix support for highmem Jens Axboe
2005-03-16 15:13 ` James Bottomley
2005-03-16 16:04 ` Jens Axboe
2005-03-16 16:48 ` Matthew Wilcox
2005-03-16 16:53 ` Jens Axboe
2005-03-16 17:02 ` Christoph Hellwig
2005-03-16 17:04 ` Jens Axboe
2005-03-16 18:44 ` Mike Christie
2005-03-16 18:53 ` iSCSI and scatterlists Matthew Wilcox
2005-03-16 19:59 ` Dmitry Yusupov
2005-03-16 18:53 ` [PATCH] dc395x: Fix support for highmem Jens Axboe
2005-03-20 9:14 ` Christoph Hellwig
2005-03-20 20:51 ` Guennadi Liakhovetski
2005-03-21 7:55 ` Jens Axboe
[not found] ` <7044.1111398919@www16.gmx.net>
2005-03-21 10:38 ` gl
2005-03-21 10:44 ` Jens Axboe
2005-03-21 11:00 ` gl
2005-03-30 21:22 ` Guennadi Liakhovetski
2005-03-30 22:13 ` James Bottomley
2005-03-31 8:58 ` gl
2005-04-09 22:48 ` Guennadi Liakhovetski
2005-04-21 21:49 ` Guennadi Liakhovetski
2005-04-22 11:36 ` Jens Axboe
2005-04-23 9:35 ` Guennadi Liakhovetski
2005-04-23 10:06 ` Guennadi Liakhovetski
2005-04-23 19:01 ` James Bottomley
2005-04-24 0:22 ` Guennadi Liakhovetski
2005-04-24 14:31 ` Guennadi Liakhovetski
2005-04-24 22:11 ` James Bottomley [this message]
2005-04-25 19:56 ` Guennadi Liakhovetski
2005-03-16 20:24 ` Guennadi Liakhovetski
2005-03-17 7:40 ` Jens Axboe
[not found] ` <22734.1111050528@www13.gmx.net>
2005-03-17 9:41 ` gl
2005-03-17 10:08 ` Jens Axboe
2005-03-17 10:56 ` gl
2005-03-17 20:51 ` Guennadi Liakhovetski
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=1114380718.4786.10.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=axboe@suse.de \
--cc=g.liakhovetski@gmx.de \
--cc=garloff@suse.de \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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