Date: Wed, 29 Mar 2006 22:22:14 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94267 for review Message-ID: <200603292222.k2TMME9T078275@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94267 Change 94267 by marcel@marcel_nfs on 2006/03/29 22:22:07 Remove interrupt tracing/debugging code. Affected files ... .. //depot/projects/uart/dev/scc/scc_core.c#13 edit Differences ... ==== //depot/projects/uart/dev/scc/scc_core.c#13 (text+ko) ==== @@ -45,54 +45,12 @@ #include "scc_if.h" -#define SCC_ITRACE - devclass_t scc_devclass; char scc_driver_name[] = "scc"; MALLOC_DEFINE(M_SCC, "SCC", "SCC driver"); -#ifdef SCC_ITRACE -#define SCC_ITRACE_BUFSZ 128 -static uint32_t scc_itrace_entry[SCC_ITRACE_BUFSZ]; -static uint32_t scc_itrace_count[SCC_ITRACE_BUFSZ]; -static int scc_itrace_head = 0; - static void -scc_itrace_log(struct scc_softc *sc, int ch, int ipend) -{ - uint32_t entry; - int unit; - - unit = device_get_unit(sc->sc_dev); - entry = ipend | (ch << 8) | unit; - - if (scc_itrace_entry[scc_itrace_head] == entry) { - scc_itrace_count[scc_itrace_head]++; - } else { - scc_itrace_head = (scc_itrace_head + 1) % SCC_ITRACE_BUFSZ; - scc_itrace_entry[scc_itrace_head] = entry; - scc_itrace_count[scc_itrace_head] = 1; - } -} - -void scc_itrace_dump(void); -void -scc_itrace_dump() -{ - int idx; - - idx = scc_itrace_head; - do { - if (scc_itrace_entry[idx] != 0) - printf("%06x %u\n", scc_itrace_entry[idx], - scc_itrace_count[idx]); - idx = (idx == 0) ? SCC_ITRACE_BUFSZ - 1 : idx - 1; - } while (idx != scc_itrace_head); -} -#endif /* SCC_ITRACE */ - -static void scc_bfe_intr(void *arg) { struct scc_softc *sc = arg; @@ -103,13 +61,6 @@ cl = sc->sc_class; while (!sc->sc_leaving && (ipend = SCC_IPEND(sc)) != 0) { -#ifdef SCC_ITRACE - for (c = 0; c < cl->cl_channels; c++) { - ch = &sc->sc_chan[c]; - if (ch->ch_ipend) - scc_itrace_log(sc, ch->ch_nr, ch->ch_ipend); - } -#endif i = 0, isrc = SER_INT_OVERRUN; while (ipend) { while (i < SCC_ISRCCNT && !(ipend & isrc))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603292222.k2TMME9T078275>