From owner-p4-projects@FreeBSD.ORG Sun Jan 7 18:33:36 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 29FD316A407; Sun, 7 Jan 2007 18:33:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E074416A415 for ; Sun, 7 Jan 2007 18:33:35 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id C4A6013C458 for ; Sun, 7 Jan 2007 18:33:35 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l07IXZhh091081 for ; Sun, 7 Jan 2007 18:33:35 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l07IXZs6091078 for perforce@freebsd.org; Sun, 7 Jan 2007 18:33:35 GMT (envelope-from piso@freebsd.org) Date: Sun, 7 Jan 2007 18:33:35 GMT Message-Id: <200701071833.l07IXZs6091078@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 112658 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jan 2007 18:33:36 -0000 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);