From: Prarit Bhargava <prarit@redhat.com>
To: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
joro@8bytes.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, jakub@redhat.com
Subject: Re: [PATCH]: PCI: GART iommu alignment fixes [v2]
Date: Fri, 08 Aug 2008 11:18:41 -0400 [thread overview]
Message-ID: <489C63D1.1000407@redhat.com> (raw)
In-Reply-To: <20080808071244.GB6931@il.ibm.com>
Muli Ben-Yehuda wrote:
> On Thu, Aug 07, 2008 at 01:41:40PM -0400, Prarit Bhargava wrote:
>
>
>> As for Calgary, I'm looking into it ATM. I think I can get my hands
>> on one.
>>
>
> Feel free to ping me if Calgary testing is needed.
>
Muli -- I just ran tests on an IBM system with a Calgary iommu that Ed
Pollard pointed me at.
dma_ops_alloc_addresses() does not have the option to return
size-aligned values. This means that
pci_alloc_consistent()/dma_alloc_coherent() will return unaligned values
to callers when the lower 4G of memory not available.
Additionally, a quick test shows that in dma_ops_alloc_addresses()
boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1,
PAGE_SIZE) >> PAGE_SHIFT;
may return 0 in the same manner I've been pointing out -- if
dma_get_seg_boundary(dev) returns 0xffffffff and 1 is added to that
result, boundary_size = 0. Then you BUG() in the iommu-helper code.
Jesse pointed out to me that my fix on that line is incorrect. _If_
this is not a compiler issue (I've emailed jakub privately and cc'd him
on this email) then a better fix would be to do (sorry for the
cut-and-paste):
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -78,7 +78,7 @@ static inline unsigned int dma_set_max_seg_size(struct
device
static inline unsigned long dma_get_seg_boundary(struct device *dev)
{
return dev->dma_parms ?
- dev->dma_parms->segment_boundary_mask : 0xffffffff;
+ dev->dma_parms->segment_boundary_mask : 0xffffffffUL;
}
However, I'm still waiting for clarification from jakub before
submitting again with that chunk.
P.
> Cheers,
> Muli
>
next prev parent reply other threads:[~2008-08-08 15:21 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 11:19 [PATCH]: PCI: GART iommu alignment fixes [v2] Prarit Bhargava
2008-07-23 22:10 ` Joerg Roedel
2008-07-23 23:14 ` FUJITA Tomonori
2008-07-23 23:47 ` Prarit Bhargava
2008-07-24 7:46 ` Joerg Roedel
2008-07-24 10:09 ` Prarit Bhargava
2008-07-24 10:34 ` FUJITA Tomonori
2008-07-24 12:37 ` Joerg Roedel
2008-07-24 12:49 ` Prarit Bhargava
2008-07-24 13:32 ` FUJITA Tomonori
2008-07-24 14:31 ` Prarit Bhargava
2008-07-24 14:40 ` FUJITA Tomonori
2008-07-24 15:13 ` Prarit Bhargava
2008-07-24 14:45 ` Prarit Bhargava
2008-07-28 22:23 ` Jesse Barnes
2008-07-29 14:24 ` Prarit Bhargava
2008-07-29 17:08 ` Jesse Barnes
2008-07-30 0:43 ` FUJITA Tomonori
2008-08-06 12:29 ` Prarit Bhargava
2008-08-06 13:23 ` Prarit Bhargava
2008-08-06 13:35 ` FUJITA Tomonori
2008-08-06 14:32 ` Prarit Bhargava
2008-08-07 17:03 ` Jesse Barnes
2008-08-07 17:41 ` Prarit Bhargava
2008-08-08 7:12 ` Muli Ben-Yehuda
2008-08-08 15:18 ` Prarit Bhargava [this message]
2008-08-08 16:15 ` Jesse Barnes
2008-08-08 21:13 ` FUJITA Tomonori
2008-08-09 1:40 ` Prarit Bhargava
2008-08-09 3:50 ` FUJITA Tomonori
2008-08-15 16:16 ` Ingo Molnar
2008-08-15 18:00 ` Ingo Molnar
2008-08-15 20:39 ` Prarit Bhargava
2008-08-15 21:20 ` Ingo Molnar
2008-08-16 1:15 ` FUJITA Tomonori
2008-08-17 12:56 ` Ingo Molnar
2008-08-17 15:36 ` FUJITA Tomonori
2008-08-17 15:42 ` Ingo Molnar
2008-08-17 15:48 ` FUJITA Tomonori
2008-08-17 15:54 ` FUJITA Tomonori
2008-08-07 17:45 ` Prarit Bhargava
2008-07-23 23:23 ` FUJITA Tomonori
2008-07-23 23:24 ` Prarit Bhargava
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=489C63D1.1000407@redhat.com \
--to=prarit@redhat.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jakub@redhat.com \
--cc=jbarnes@virtuousgeek.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=muli@il.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.