From: Roland Dreier <rdreier@cisco.com>
To: Steve Wise <swise@opengridcomputing.com>
Cc: Benjamin Herrenschmidt <bherren@au1.ibm.com>,
linux-kernel@vger.kernel.org,
OpenFabrics General <general@lists.openfabrics.org>,
Wen Xiong <wenxiong@us.ibm.com>
Subject: Re: [ofa-general] iommu dma mapping alignment requirements
Date: Thu, 20 Dec 2007 10:07:39 -0800 [thread overview]
Message-ID: <adalk7pz1ck.fsf@cisco.com> (raw)
In-Reply-To: <476AA2E2.5010007@opengridcomputing.com> (Steve Wise's message of "Thu, 20 Dec 2007 11:14:10 -0600")
> It appears that my problem boils down to a single host page of memory
> that is mapped for dma, and the dma address returned by dma_map_sg()
> is _not_ 64KB aligned. Here is an example:
> My first question is: Is there an assumption or requirement in linux
> that dma_addressess should have the same alignment as the host address
> they are mapped to? IE the rdma core is mapping the entire 64KB page,
> but the mapping doesn't begin on a 64KB page boundary.
I don't think this is explicitly documented anywhere, but it certainly
seems that we want the bus address to be page-aligned in this case.
For mthca/mlx4 at least, we tell the adapter what the host page size
is (so that it knows how to align doorbell pages etc) and I think this
sort of thing would confuse the HW.
- R.
next prev parent reply other threads:[~2007-12-20 18:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-20 17:14 iommu dma mapping alignment requirements Steve Wise
2007-12-20 17:29 ` [ofa-general] " Tom Tucker
2007-12-20 18:07 ` Roland Dreier [this message]
2007-12-20 19:11 ` Steve Wise
2007-12-20 19:29 ` Steve Wise
2007-12-20 20:21 ` Benjamin Herrenschmidt
2007-12-20 21:22 ` Steve Wise
2007-12-20 20:17 ` Benjamin Herrenschmidt
2007-12-20 21:02 ` Steve Wise
2007-12-20 21:26 ` Benjamin Herrenschmidt
2007-12-20 22:12 ` Steve Wise
2007-12-20 23:49 ` Benjamin Herrenschmidt
2007-12-21 4:49 ` Steve Wise
2007-12-21 5:38 ` Benjamin Herrenschmidt
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=adalk7pz1ck.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=bherren@au1.ibm.com \
--cc=general@lists.openfabrics.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swise@opengridcomputing.com \
--cc=wenxiong@us.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.