PERFORCE change 100369 for review

Peter Wemm peter at FreeBSD.org
Sat Jul 1 00:11:17 UTC 2006


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

Change 100369 by peter at peter_daintree on 2006/07/01 00:11:08

	pass the vector to the interrupt handler rather than looking it up again.

Affected files ...

.. //depot/projects/bike_sched/sys/i386/i386/intr_machdep.c#2 edit
.. //depot/projects/bike_sched/sys/i386/i386/local_apic.c#2 edit

Differences ...

==== //depot/projects/bike_sched/sys/i386/i386/intr_machdep.c#2 (text+ko) ====

@@ -166,7 +166,7 @@
 }
 
 void
-intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame)
+intr_execute_handlers(struct intsrc *isrc, u_int vector, struct trapframe *frame)
 {
 	struct thread *td;
 	struct intr_event *ie;
@@ -190,7 +190,6 @@
 	 * XXX: We assume that IRQ 0 is only used for the ISA timer
 	 * device (clk).
 	 */
-	vector = isrc->is_pic->pic_vector(isrc);
 	if (vector == 0)
 		clkintr_pending = 1;
 

==== //depot/projects/bike_sched/sys/i386/i386/local_apic.c#2 (text+ko) ====

@@ -601,10 +601,11 @@
 {
 	struct intsrc *isrc;
 
-	if (vector == -1)
-		panic("Couldn't get vector from ISR!");
+	KASSERT(vector >= APIC_IO_INTS && vector != IDT_SYSCALL &&
+	    vector <= APIC_IO_INTS + APIC_NUM_IOINTS,
+	    ("Vector %u does not map to an IRQ line", vector));
 	isrc = intr_lookup_source(apic_idt_to_irq(vector));
-	intr_execute_handlers(isrc, &frame);
+	intr_execute_handlers(isrc, vector, &frame);
 }
 
 void


More information about the p4-projects mailing list