Date: Sun, 7 Jan 2007 18:33:35 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 112658 for review Message-ID: <200701071833.l07IXZs6091078@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112658 Change 112658 by piso@piso_newluxor on 2007/01/07 18:33:13 Do not use empty stub functions: kill intr_eoi_src_stub() and intr_eoi_disab_src_stub(), check for NULL in kerne_intr.c::intr_event_handle() instead. Affected files ... .. //depot/projects/soc2006/intr_filter/arm/arm/intr.c#18 edit .. //depot/projects/soc2006/intr_filter/ia64/ia64/interrupt.c#18 edit .. //depot/projects/soc2006/intr_filter/kern/kern_intr.c#30 edit .. //depot/projects/soc2006/intr_filter/sparc64/sparc64/intr_machdep.c#18 edit .. //depot/projects/soc2006/intr_filter/sys/interrupt.h#15 edit Differences ... ==== //depot/projects/soc2006/intr_filter/arm/arm/intr.c#18 (text+ko) ==== @@ -78,7 +78,7 @@ event = intr_events[irq]; if (event == NULL) { error = intr_event_create(&event, (void *)irq, 0, - (void (*)(void *))arm_unmask_irq, NULL, intr_eoi_src_stub, + (void (*)(void *))arm_unmask_irq, NULL, NULL, intr_disab_eoi_src, "intr%d:", irq); if (error) return; ==== //depot/projects/soc2006/intr_filter/ia64/ia64/interrupt.c#18 (text+ko) ==== @@ -329,7 +329,7 @@ } errcode = intr_event_create(&i->event, (void *)vector, 0, (void (*)(void *))ia64_send_eoi, NULL, intr_eoi_src, - intr_disab_eoi_src_stub, "intr:"); + NULL, "intr:"); if (errcode) { free(i, M_DEVBUF); return errcode; ==== //depot/projects/soc2006/intr_filter/kern/kern_intr.c#30 (text+ko) ==== @@ -962,23 +962,6 @@ } } -/* - * To avoid code duplication across different archs, use these functions - * for interrupt eoiing and disabling when you don't actually need to do - * any real action on the interrupt controller. - */ -void -intr_eoi_src_stub(void *arg __unused) -{ - ; -} - -void -intr_disab_eoi_src_stub(void *arg __unused) -{ - ; -} - /* * Main interrupt handling body. * @@ -1013,10 +996,13 @@ * it unmasked. Otherwise, mask the source as well as sending * it an EOI. */ - if (thread & FILTER_HANDLED) - ie->ie_eoi(ie->ie_source); - else - ie->ie_disab(ie->ie_source); + if (thread & FILTER_HANDLED) { + if (ie->ie_eoi != NULL) + ie->ie_eoi(ie->ie_source); + } else { + if (ie->ie_disab != NULL) + ie->ie_disab(ie->ie_source); + } critical_exit(); /* Interrupt storm logic */ ==== //depot/projects/soc2006/intr_filter/sparc64/sparc64/intr_machdep.c#18 (text+ko) ==== @@ -304,7 +304,7 @@ mtx_unlock_spin(&intr_table_lock); if (ie == NULL) { errcode = intr_event_create(&ie, (void *)(intptr_t)vec, 0, NULL, - NULL, intr_eoi_src_stub, intr_disab_eoi_src_stub, "vec%d:", + NULL, NULL, NULL, "vec%d:", vec); if (errcode) return (errcode); ==== //depot/projects/soc2006/intr_filter/sys/interrupt.h#15 (text+ko) ==== @@ -119,8 +119,6 @@ int intr_filter_loop(struct intr_event *ie, struct trapframe *frame, struct intr_thread **ithd); void stray_detection(void *_arg); -void intr_eoi_src_stub(void *arg __unused); -void intr_disab_eoi_src_stub(void *arg __unused); int intr_event_handle(struct intr_event *ie, struct trapframe *frame, void (*intr_eoi_src)(void *), void (*intr_disab_eoi_src)(void *)); u_char intr_priority(enum intr_type flags);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701071833.l07IXZs6091078>