From owner-p4-projects@FreeBSD.ORG Sat Jul 1 00:11:17 2006 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 515F016A412; Sat, 1 Jul 2006 00:11:17 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1283116A403 for ; Sat, 1 Jul 2006 00:11:17 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF0A843D46 for ; Sat, 1 Jul 2006 00:11:16 +0000 (GMT) (envelope-from peter@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 k610BGuQ099248 for ; Sat, 1 Jul 2006 00:11:16 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k610BGqU099245 for perforce@freebsd.org; Sat, 1 Jul 2006 00:11:16 GMT (envelope-from peter@freebsd.org) Date: Sat, 1 Jul 2006 00:11:16 GMT Message-Id: <200607010011.k610BGqU099245@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 100369 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: Sat, 01 Jul 2006 00:11:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=100369 Change 100369 by peter@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