Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/x86/x86/intr.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/x86/x86/intr.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.74 retrieving revision 1.74.2.1 diff -u -p -r1.74 -r1.74.2.1 --- src/sys/arch/x86/x86/intr.c 2012/06/15 13:57:59 1.74 +++ src/sys/arch/x86/x86/intr.c 2013/06/23 06:20:14 1.74.2.1 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.74 2012/06/15 13:57:59 yamt Exp $ */ +/* $NetBSD: intr.c,v 1.74.2.1 2013/06/23 06:20:14 tls Exp $ */ /*- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ */ #include -__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.74.2.1 2013/06/23 06:20:14 tls Exp $"); #include "opt_intrdebug.h" #include "opt_multiprocessor.h" @@ -1063,10 +1063,6 @@ cpu_intr_init(struct cpu_info *ci) #if defined(INTRDEBUG) || defined(DDB) -#ifdef DDB -#define printf db_printf -#endif - void intr_printconfig(void) { @@ -1075,30 +1071,45 @@ intr_printconfig(void) 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