diff options
author | marcel <marcel@FreeBSD.org> | 2008-09-14 21:30:01 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2008-09-14 21:30:01 +0000 |
commit | ec85df75b4df8b81ca38938e80e5b3a073b25068 (patch) | |
tree | 2540e1a8b66c1b59854334afcb554fc37f440822 /sys/powerpc | |
parent | ac456c47d5211fad3a62d90666eff568a9e21985 (diff) | |
download | FreeBSD-src-ec85df75b4df8b81ca38938e80e5b3a073b25068.zip FreeBSD-src-ec85df75b4df8b81ca38938e80e5b3a073b25068.tar.gz |
Remove debugging code.
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/powerpc/openpic.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/sys/powerpc/powerpc/openpic.c b/sys/powerpc/powerpc/openpic.c index 88d2614..89b9ec0 100644 --- a/sys/powerpc/powerpc/openpic.c +++ b/sys/powerpc/powerpc/openpic.c @@ -162,15 +162,15 @@ openpic_attach(device_t dev) for (irq = 0; irq < sc->sc_nirq; irq++) openpic_write(sc, OPENPIC_IDEST(irq), 1 << 0); - for (cpu = 0; cpu < sc->sc_ncpu; cpu++) - openpic_write(sc, OPENPIC_PCPU_TPR(cpu), 0); - /* clear all pending interrupts */ for (irq = 0; irq < sc->sc_nirq; irq++) { (void)openpic_read(sc, OPENPIC_PCPU_IACK(PCPU_GET(cpuid))); openpic_write(sc, OPENPIC_PCPU_EOI(PCPU_GET(cpuid)), 0); } + for (cpu = 0; cpu < sc->sc_ncpu; cpu++) + openpic_write(sc, OPENPIC_PCPU_TPR(cpu), 0); + powerpc_register_pic(dev, sc->sc_nirq); return (0); @@ -203,25 +203,17 @@ openpic_config(device_t dev, u_int irq, enum intr_trigger trig, void openpic_dispatch(device_t dev, struct trapframe *tf) { - static int once = 0; struct openpic_softc *sc; - u_int vector; - - if (once == 0 && PCPU_GET(cpuid) != 0) { - printf("XXX: got interrupt!\n"); - once++; - } + u_int cpuid, vector; + cpuid = PCPU_GET(cpuid); sc = device_get_softc(dev); + while (1) { - vector = openpic_read(sc, OPENPIC_PCPU_IACK(PCPU_GET(cpuid))); + vector = openpic_read(sc, OPENPIC_PCPU_IACK(cpuid)); vector &= OPENPIC_VECTOR_MASK; if (vector == 255) break; - if (once == 1 && PCPU_GET(cpuid) != 0) { - printf("XXX: got vector %u\n", vector); - once++; - } powerpc_dispatch_intr(vector, tf); } } |