Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18742
b: refs/heads/master
c: 1ae6138
h: refs/heads/master
v: v3
  • Loading branch information
Eric Sesterhenn authored and David S. Miller committed Jan 17, 2006
1 parent 97883af commit 927d088
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 9eb3394bf2037120881a8846bc67064f49325366
refs/heads/master: 1ae613883468eab2fb8a077aad9fdedfbfa73d1b
13 changes: 6 additions & 7 deletions trunk/arch/sparc/mm/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ static void iommu_release_one(u32 busa, int npages, struct sbus_bus *sbus)
int ioptex;
int i;

if (busa < iommu->start)
BUG();
BUG_ON(busa < iommu->start);
ioptex = (busa - iommu->start) >> PAGE_SHIFT;
for (i = 0; i < npages; i++) {
iopte_val(iommu->page_table[ioptex + i]) = 0;
Expand Down Expand Up @@ -340,9 +339,9 @@ static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va,
iopte_t *first;
int ioptex;

if ((va & ~PAGE_MASK) != 0) BUG();
if ((addr & ~PAGE_MASK) != 0) BUG();
if ((len & ~PAGE_MASK) != 0) BUG();
BUG_ON((va & ~PAGE_MASK) != 0);
BUG_ON((addr & ~PAGE_MASK) != 0);
BUG_ON((len & ~PAGE_MASK) != 0);

/* page color = physical address */
ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT,
Expand Down Expand Up @@ -405,8 +404,8 @@ static void iommu_unmap_dma_area(unsigned long busa, int len)
unsigned long end;
int ioptex = (busa - iommu->start) >> PAGE_SHIFT;

if ((busa & ~PAGE_MASK) != 0) BUG();
if ((len & ~PAGE_MASK) != 0) BUG();
BUG_ON((busa & ~PAGE_MASK) != 0);
BUG_ON((len & ~PAGE_MASK) != 0);

iopte += ioptex;
end = busa + len;
Expand Down

0 comments on commit 927d088

Please sign in to comment.