From owner-p4-projects@FreeBSD.ORG Fri Jan 5 15:52:03 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 4E43216A416; Fri, 5 Jan 2007 15:52:03 +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 11FA816A412 for ; Fri, 5 Jan 2007 15:52:03 +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 00D5C13C46A for ; Fri, 5 Jan 2007 15:52:03 +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 l05Fq26F050063 for ; Fri, 5 Jan 2007 15:52:02 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l05Fq267050059 for perforce@freebsd.org; Fri, 5 Jan 2007 15:52:02 GMT (envelope-from piso@freebsd.org) Date: Fri, 5 Jan 2007 15:52:02 GMT Message-Id: <200701051552.l05Fq267050059@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 112545 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: Fri, 05 Jan 2007 15:52:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=112545 Change 112545 by piso@piso_newluxor on 2007/01/05 15:51:53 Consolidate all the archs on the same behaviour: in case intr_event_schedule_thread() fails, panic! So far, sparc64 was the only arch that didn't panic in this case. Affected files ... .. //depot/projects/soc2006/intr_filter/amd64/amd64/intr_machdep.c#13 edit .. //depot/projects/soc2006/intr_filter/arm/arm/intr.c#12 edit .. //depot/projects/soc2006/intr_filter/i386/i386/intr_machdep.c#20 edit .. //depot/projects/soc2006/intr_filter/ia64/ia64/interrupt.c#11 edit .. //depot/projects/soc2006/intr_filter/kern/kern_intr.c#23 edit .. //depot/projects/soc2006/intr_filter/powerpc/powerpc/intr_machdep.c#17 edit .. //depot/projects/soc2006/intr_filter/sparc64/sparc64/intr_machdep.c#12 edit Differences ... ==== //depot/projects/soc2006/intr_filter/amd64/amd64/intr_machdep.c#13 (text+ko) ==== @@ -280,9 +280,6 @@ /* FALLTHROUGH */ case ECHILD: break; - case EFAULT: - panic("Bad stray interrupt\n"); - break; case EINVAL: /* * For stray interrupts, mask and EOI the source, bump the ==== //depot/projects/soc2006/intr_filter/arm/arm/intr.c#12 (text+ko) ==== @@ -148,8 +148,6 @@ break; case ECHILD: break; - case EFAULT: - /* FALLTHROUGH */ case EINVAL: break; default: ==== //depot/projects/soc2006/intr_filter/i386/i386/intr_machdep.c#20 (text+ko) ==== @@ -268,9 +268,6 @@ /* FALLTHROUGH */ case ECHILD: break; - case EFAULT: - panic("Bad stray interrupt\n"); - break; case EINVAL: /* * For stray interrupts, mask and EOI the source, bump the ==== //depot/projects/soc2006/intr_filter/ia64/ia64/interrupt.c#11 (text+ko) ==== @@ -404,9 +404,6 @@ case ECHILD: ia64_send_eoi(vector); break; - case EFAULT: - panic("Got an impossible stray interrupt\n"); - break; case EINVAL: panic("Interrupt vector without an event\n"); break; ==== //depot/projects/soc2006/intr_filter/kern/kern_intr.c#23 (text+ko) ==== @@ -1005,7 +1005,6 @@ * o 0: everything ok. * o EINVAL: stray interrupt. * o ECHILD: no ithread scheduled. - * o EFAULT: something went wrong with ithread scheduling. */ int mi_handle_intr(struct intr_event *ie, struct trapframe *frame, @@ -1055,7 +1054,8 @@ /* Schedule an ithread if needed. */ if (thread & FILTER_SCHEDULE_THREAD) { error = intr_event_schedule_thread(ie, ithd); - res = (error == 0) ? 0 : EFAULT; + if (error != 0) + panic("%s: impossible stray interrupt", __func__); } else res = ECHILD; td->td_intr_nesting_level--; ==== //depot/projects/soc2006/intr_filter/powerpc/powerpc/intr_machdep.c#17 (text+ko) ==== @@ -288,9 +288,6 @@ case ECHILD: irq_enable(irq); break; - case EFAULT: - panic("%s: impossible stray interrupt", __func__); - break; case EINVAL: stray_int(irq); break; ==== //depot/projects/soc2006/intr_filter/sparc64/sparc64/intr_machdep.c#12 (text+ko) ==== @@ -279,8 +279,6 @@ /* FALLTHROUGH */ case ECHILD: break; - case EFAULT: - /* FALLTHROUGH */ case EINVAL: intr_stray_vector(iv); break;