Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112580
b: refs/heads/master
c: ac4ff65
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and Ingo Molnar committed Sep 10, 2008
1 parent 3ab0b62 commit 11cc8cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 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: 636dc67cbf8c481a996faf6c23f0532d0f02ebad
refs/heads/master: ac4ff656c07ada78316307b0c0ce8a8eb48aa6dd
16 changes: 3 additions & 13 deletions trunk/arch/x86/kernel/pci-gart_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,24 +214,14 @@ static void iommu_full(struct device *dev, size_t size, int dir)
static inline int
need_iommu(struct device *dev, unsigned long addr, size_t size)
{
u64 mask = *dev->dma_mask;
int high = addr + size > mask;
int mmu = high;

if (force_iommu)
mmu = 1;

return mmu;
return force_iommu ||
!is_buffer_dma_capable(*dev->dma_mask, addr, size);
}

static inline int
nonforced_iommu(struct device *dev, unsigned long addr, size_t size)
{
u64 mask = *dev->dma_mask;
int high = addr + size > mask;
int mmu = high;

return mmu;
return !is_buffer_dma_capable(*dev->dma_mask, addr, size);
}

/* Map a single continuous physical area into the IOMMU.
Expand Down

0 comments on commit 11cc8cf

Please sign in to comment.