Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 312135 Details for
Bug 455813
Under heavy memory usage dma_alloc_coherent does not return aligned address
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Additional Upstream bug fix related to this issue
upstream2.patch (text/plain), 1.92 KB, created by
Prarit Bhargava
on 2008-07-18 13:41:20 UTC
(
hide
)
Description:
Additional Upstream bug fix related to this issue
Filename:
MIME Type:
Creator:
Prarit Bhargava
Created:
2008-07-18 13:41:20 UTC
Size:
1.92 KB
patch
obsolete
>pci_alloc_consistent/dma_alloc_coherent is supposed to return size aligned >addresses. > >From Documentation/DMA-mapping.txt: > >"pci_alloc_consistent returns two values: the virtual address which you >can use to access it from the CPU and dma_handle which you pass to the >card. > >The cpu return address and the DMA bus master address are both >guaranteed to be aligned to the smallest PAGE_SIZE order which >is greater than or equal to the requested size. This invariant >exists (for example) to guarantee that if you allocate a chunk >which is smaller than or equal to 64 kilobytes, the extent of the >buffer you receive will not cross a 64K boundary." > >Fix the GART's alloc_iommu code to return a size aligned address. Also fix >an incorrect alignment calculation in the iommu-helper code. > >Signed-off-by: Prarit Bhargava <prarit@redhat.com> > >diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c >index faf3229..329718e 100644 >--- a/arch/x86/kernel/pci-gart_64.c >+++ b/arch/x86/kernel/pci-gart_64.c >@@ -96,11 +96,12 @@ static unsigned long alloc_iommu(struct device *dev, int size) > > spin_lock_irqsave(&iommu_bitmap_lock, flags); > offset = iommu_area_alloc(iommu_gart_bitmap, iommu_pages, next_bit, >- size, base_index, boundary_size, 0); >+ size, base_index, boundary_size, size - 1); > if (offset == -1) { > need_flush = 1; > offset = iommu_area_alloc(iommu_gart_bitmap, iommu_pages, 0, >- size, base_index, boundary_size, 0); >+ size, base_index, boundary_size, >+ size - 1); > } > if (offset != -1) { > set_bit_string(iommu_gart_bitmap, offset, size); >diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c >index a3b8d4c..b970f1b 100644 >--- a/lib/iommu-helper.c >+++ b/lib/iommu-helper.c >@@ -16,7 +16,7 @@ again: > index = find_next_zero_bit(map, size, start); > > /* Align allocation */ >- index = (index + align_mask) & ~align_mask; >+ index = (index + align_mask + 1) & ~align_mask; > > end = index + nr; > if (end >= size)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 455813
:
312088
|
312089
|
312135
|
312136
|
312164
|
312463
|
313699