Subject: port-sparc64/20187: missing "#ifdef DDB"s around Debugger calls in arch/sparc64/dev/iommu.c
To: None <gnats-bugs@gnats.netbsd.org>
From: Izaac <izaac@setec.org>
List: netbsd-bugs
Date: 02/03/2003 16:19:37
>Number: 20187
>Category: port-sparc64
>Synopsis: missing "#ifdef DDB"s around Debugger calls in arch/sparc64/dev/iommu.c
>Confidential: no
>Severity: non-critical
>Priority: high
>Responsible: port-sparc64-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 03 13:20:02 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Izaac
>Release: netbsd-1-6-PATCH001-RC1
>Organization:
>Environment:
N/A
>Description:
Several functions function in arch/sparc/64/dev/iommu.c call
Debugger(); however, a number of them are not properly insulated
against inclusision when DIAGNOSTIC is defined and DDB is
not, causing kernel compilation to halt:
arch/sparc64/dev/iommu.c:576:warning: implicit declaration of function `Debugger'
*** Error code 1
>How-To-Repeat:
N/A
>Fix:
Index: iommu.c
===================================================================
RCS file: /cvsroots/netbsd/src/sys/arch/sparc64/dev/iommu.c,v
retrieving revision 1.51.4.6
diff -p -u -r1.51.4.6 iommu.c
--- iommu.c 1 Dec 2002 22:18:03 -0000 1.51.4.6
+++ iommu.c 3 Feb 2003 21:03:46 -0000
@@ -573,7 +573,9 @@ iommu_dvmamap_load(t, sb, map, buf, bufl
printf("seg %d dvmaddr %lx out of range %x - %x\n",
seg, (long)map->dm_segs[seg].ds_addr,
is->is_dvmabase, is->is_dvmaend);
+#ifdef DDB
Debugger();
+#endif
}
}
#endif
@@ -698,7 +700,9 @@ iommu_dvmamap_load_raw(t, sb, map, segs,
{
printf("iommu_dvmamap_load_raw(): extent_alloc(%d, %x) failed!\n",
(int)sgsize, flags);
+#ifdef DDB
Debugger();
+#endif
}
#endif
if (dvmaddr == (bus_addr_t)-1)
@@ -817,7 +821,9 @@ iommu_dvmamap_load_raw(t, sb, map, segs,
printf("seg %d dvmaddr %lx out of range %x - %x\n",
seg, (long)map->dm_segs[seg].ds_addr,
is->is_dvmabase, is->is_dvmaend);
+#ifdef DDB
Debugger();
+#endif
}
}
}
@@ -882,7 +888,9 @@ iommu_dvmamap_load_raw(t, sb, map, segs,
printf("seg %d dvmaddr %lx out of range %x - %x\n",
seg, (long)map->dm_segs[seg].ds_addr,
is->is_dvmabase, is->is_dvmaend);
+#ifdef DDB
Debugger();
+#endif
}
}
}
>Release-Note:
>Audit-Trail:
>Unformatted: