Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 only use db_printf() if we're actually call...
details: https://anonhg.NetBSD.org/src/rev/0de2f533d787
branches: trunk
changeset: 785695:0de2f533d787
user: chs <chs%NetBSD.org@localhost>
date: Mon Mar 25 01:34:59 2013 +0000
description:
only use db_printf() if we're actually called from DDB.
this prevents the boot-time one from pausing the boot process.
diffstat:
sys/arch/x86/x86/intr.c | 39 +++++++++++++++++++++++++--------------
1 files changed, 25 insertions(+), 14 deletions(-)
diffs (83 lines):
diff -r 3f696b774b94 -r 0de2f533d787 sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c Mon Mar 25 01:30:37 2013 +0000
+++ b/sys/arch/x86/x86/intr.c Mon Mar 25 01:34:59 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.74 2012/06/15 13:57:59 yamt Exp $ */
+/* $NetBSD: intr.c,v 1.75 2013/03/25 01:34:59 chs Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.74 2012/06/15 13:57:59 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.75 2013/03/25 01:34:59 chs Exp $");
#include "opt_intrdebug.h"
#include "opt_multiprocessor.h"
@@ -1063,10 +1063,6 @@
#if defined(INTRDEBUG) || defined(DDB)
-#ifdef DDB
-#define printf db_printf
-#endif
-
void
intr_printconfig(void)
{
@@ -1075,30 +1071,45 @@
struct intrsource *isp;
struct cpu_info *ci;
CPU_INFO_ITERATOR cii;
+ void (*pr)(const char *, ...);
+
+ pr = printf;
+#ifdef DDB
+ extern int db_active;
+ if (db_active) {
+ pr = db_printf;
+ }
+#endif
for (CPU_INFO_FOREACH(cii, ci)) {
- printf("%s: interrupt masks:\n", device_xname(ci->ci_dev));
+ (*pr)("%s: interrupt masks:\n", device_xname(ci->ci_dev));
for (i = 0; i < NIPL; i++)
- printf("IPL %d mask %lx unmask %lx\n", i,
+ (*pr)("IPL %d mask %lx unmask %lx\n", i,
(u_long)ci->ci_imask[i], (u_long)ci->ci_iunmask[i]);
for (i = 0; i < MAX_INTR_SOURCES; i++) {
isp = ci->ci_isources[i];
if (isp == NULL)
continue;
- printf("%s source %d is pin %d from pic %s maxlevel %d\n",
+ (*pr)("%s source %d is pin %d from pic %s type %d maxlevel %d\n",
device_xname(ci->ci_dev), i, isp->is_pin,
- isp->is_pic->pic_name, isp->is_maxlevel);
+ isp->is_pic->pic_name, isp->is_type, isp->is_maxlevel);
for (ih = isp->is_handlers; ih != NULL;
ih = ih->ih_next)
- printf("\thandler %p level %d\n",
+ (*pr)("\thandler %p level %d\n",
ih->ih_fun, ih->ih_level);
+#if NIOAPIC > 0
+ if (isp->is_pic->pic_type == PIC_IOAPIC) {
+ struct ioapic_softc *sc;
+ sc = isp->is_pic->pic_ioapic;
+ (*pr)("\tioapic redir 0x%x\n",
+ sc->sc_pins[isp->is_pin].ip_map->redir);
+ }
+#endif
}
}
}
-#ifdef DDB
-#undef printf
-#endif
+
#endif
void
Home |
Main Index |
Thread Index |
Old Index