aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-01-17 18:36:05 -0500
committerDavid S. Miller <davem@davemloft.net>2006-01-17 18:36:05 -0500
commit1ae613883468eab2fb8a077aad9fdedfbfa73d1b (patch)
tree137e13bddb040f4ae9a997473e847304dcd7c19e /arch/sparc/mm
parent9eb3394bf2037120881a8846bc67064f49325366 (diff)
[SPARC]: change if() BUG(); to BUG_ON in iommu.c
this patch changes if() BUG(); constructs in iommu.c to BUG_ON(); so it gets save to define BUG() and BUG_ON() to nullstatements. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/iommu.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
index 489bf68d5f05..77840c804786 100644
--- a/arch/sparc/mm/iommu.c
+++ b/arch/sparc/mm/iommu.c
@@ -295,8 +295,7 @@ static void iommu_release_one(u32 busa, int npages, struct sbus_bus *sbus)
295 int ioptex; 295 int ioptex;
296 int i; 296 int i;
297 297
298 if (busa < iommu->start) 298 BUG_ON(busa < iommu->start);
299 BUG();
300 ioptex = (busa - iommu->start) >> PAGE_SHIFT; 299 ioptex = (busa - iommu->start) >> PAGE_SHIFT;
301 for (i = 0; i < npages; i++) { 300 for (i = 0; i < npages; i++) {
302 iopte_val(iommu->page_table[ioptex + i]) = 0; 301 iopte_val(iommu->page_table[ioptex + i]) = 0;
@@ -340,9 +339,9 @@ static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va,
340 iopte_t *first; 339 iopte_t *first;
341 int ioptex; 340 int ioptex;
342 341
343 if ((va & ~PAGE_MASK) != 0) BUG(); 342 BUG_ON((va & ~PAGE_MASK) != 0);
344 if ((addr & ~PAGE_MASK) != 0) BUG(); 343 BUG_ON((addr & ~PAGE_MASK) != 0);
345 if ((len & ~PAGE_MASK) != 0) BUG(); 344 BUG_ON((len & ~PAGE_MASK) != 0);
346 345
347 /* page color = physical address */ 346 /* page color = physical address */
348 ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT, 347 ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT,
@@ -405,8 +404,8 @@ static void iommu_unmap_dma_area(unsigned long busa, int len)
405 unsigned long end; 404 unsigned long end;
406 int ioptex = (busa - iommu->start) >> PAGE_SHIFT; 405 int ioptex = (busa - iommu->start) >> PAGE_SHIFT;
407 406
408 if ((busa & ~PAGE_MASK) != 0) BUG(); 407 BUG_ON((busa & ~PAGE_MASK) != 0);
409 if ((len & ~PAGE_MASK) != 0) BUG(); 408 BUG_ON((len & ~PAGE_MASK) != 0);
410 409
411 iopte += ioptex; 410 iopte += ioptex;
412 end = busa + len; 411 end = busa + len;