Re: [PATCH]: PCI: GART iommu alignment fixes [v2]

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Prarit Bhargava
Date: Thursday, August 7, 2008 - 10:41 am

Jesse Barnes wrote:

True, but dma_alloc_coherent also allows for a NULL dev pointer, and 
uses a dummy struct dev (fallback_device).  So it should be callable 
without any dev struct pointer.

In that case, I hit the BUG() check warning in iommu_is_span_boundary() 
because boundary_size was calculated as (unsigned long) 0xffffffff + 1 = 0.

That's why we must cast to "unsigned long long".

ie) it is possible to hit this BUG() right now.


I've pinged someone at AMD to see if I can get my hands on a system (or 
if to see if there is a system available locally).

As for Calgary, I'm looking into it ATM.  I think I can get my hands on one.

If I find the problem on those platforms I'll ping the maintainers and 
post separate patches.  ATM I'm much more concerned about GART.


Tomonori-san, I think I understand where your confusion may lie.  The 
size argument in the iommu-helper.c code is NOT the same size in 
dma_alloc_coherent() and gart_map_simple().  In iommu-helper.c the size 
is the # of pages, and the in the exported function calls it is an 
actual size.  Is that what is confusing you?


I no longer think the above suggested change is necessary.  AFAICT, the 
code is doing exactly the right thing.  "size-1" is correct.

P.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Wed Jul 23, 4:19 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Joerg Roedel, (Wed Jul 23, 3:10 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Wed Jul 23, 4:14 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Wed Jul 23, 4:23 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Wed Jul 23, 4:24 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Wed Jul 23, 4:47 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Joerg Roedel, (Thu Jul 24, 12:46 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Thu Jul 24, 3:09 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Thu Jul 24, 3:34 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Joerg Roedel, (Thu Jul 24, 5:37 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Thu Jul 24, 5:49 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Thu Jul 24, 6:32 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Thu Jul 24, 7:31 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Thu Jul 24, 7:40 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Thu Jul 24, 7:45 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Thu Jul 24, 8:13 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Jesse Barnes, (Mon Jul 28, 3:23 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Tue Jul 29, 7:24 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Jesse Barnes, (Tue Jul 29, 10:08 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Tue Jul 29, 5:43 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Wed Aug 6, 5:29 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Wed Aug 6, 6:23 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Wed Aug 6, 6:35 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Wed Aug 6, 7:32 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Jesse Barnes, (Thu Aug 7, 10:03 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Thu Aug 7, 10:41 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Thu Aug 7, 10:45 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Muli Ben-Yehuda, (Fri Aug 8, 12:12 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Fri Aug 8, 8:18 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Jesse Barnes, (Fri Aug 8, 9:15 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Fri Aug 8, 2:13 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Fri Aug 8, 6:40 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Fri Aug 8, 8:50 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Ingo Molnar, (Fri Aug 15, 9:16 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Ingo Molnar, (Fri Aug 15, 11:00 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Prarit Bhargava, (Fri Aug 15, 1:39 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Ingo Molnar, (Fri Aug 15, 2:20 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Fri Aug 15, 6:15 pm)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Ingo Molnar, (Sun Aug 17, 5:56 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Sun Aug 17, 8:36 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], Ingo Molnar, (Sun Aug 17, 8:42 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Sun Aug 17, 8:48 am)
Re: [PATCH]: PCI: GART iommu alignment fixes [v2], FUJITA Tomonori, (Sun Aug 17, 8:54 am)