PERFORCE change 112545 for review

Paolo Pisati piso at FreeBSD.org
Fri Jan 5 07:52:03 PST 2007


http://perforce.freebsd.org/chv.cgi?CH=112545

Change 112545 by piso at 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;


More information about the p4-projects mailing list