Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112628
b: refs/heads/master
c: 40becd8
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and Ingo Molnar committed Oct 2, 2008
1 parent cfd9929 commit 22e627b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24268245d8ba9270152b2281666099ddc8ca389d
refs/heads/master: 40becd8d5af03ee7935e79c3fccd0d1f380d95b4
10 changes: 3 additions & 7 deletions trunk/arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,6 @@ static int init_unity_mappings_for_device(struct dma_ops_domain *dma_dom,
* efficient allocator.
*
****************************************************************************/
static unsigned long dma_mask_to_pages(unsigned long mask)
{
return PAGE_ALIGN(mask) >> PAGE_SHIFT;
}

/*
* The address allocator core function.
Expand All @@ -486,14 +482,14 @@ static unsigned long dma_ops_alloc_addresses(struct device *dev,
unsigned long align_mask,
u64 dma_mask)
{
unsigned long limit = dma_mask_to_pages(dma_mask);
unsigned long limit;
unsigned long address;
unsigned long size = dom->aperture_size >> PAGE_SHIFT;
unsigned long boundary_size;

boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1,
PAGE_SIZE) >> PAGE_SHIFT;
limit = limit < size ? limit : size;
limit = iommu_device_max_index(dom->aperture_size >> PAGE_SHIFT, 0,
dma_mask >> PAGE_SHIFT);

if (dom->next_bit >= limit) {
dom->next_bit = 0;
Expand Down

0 comments on commit 22e627b

Please sign in to comment.