From owner-p4-projects@FreeBSD.ORG Sat Jul 1 00:47:15 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 F23AD16A49E; Sat, 1 Jul 2006 00:47:14 +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 B866216A514 for ; Sat, 1 Jul 2006 00:47:14 +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 6A25B43D73 for ; Sat, 1 Jul 2006 00:13:20 +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 k610DKhA099345 for ; Sat, 1 Jul 2006 00:13:20 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k610DK66099342 for perforce@freebsd.org; Sat, 1 Jul 2006 00:13:20 GMT (envelope-from peter@freebsd.org) Date: Sat, 1 Jul 2006 00:13:20 GMT Message-Id: <200607010013.k610DK66099342@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 100370 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:47:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=100370 Change 100370 by peter@peter_daintree on 2006/07/01 00:12:46 Eliminate apic_idt_to_irq(). A function call to do a one-line array lookup is a bit excessive. Affected files ... .. //depot/projects/bike_sched/sys/i386/i386/local_apic.c#3 edit .. //depot/projects/bike_sched/sys/i386/include/apicvar.h#2 edit Differences ... ==== //depot/projects/bike_sched/sys/i386/i386/local_apic.c#3 (text+ko) ==== @@ -604,7 +604,7 @@ 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)); + isrc = intr_lookup_source(ioint_irqs[vector - APIC_IO_INTS]); intr_execute_handlers(isrc, vector, &frame); } @@ -741,17 +741,6 @@ mtx_unlock_spin(&icu_lock); } -/* Map an IDT vector (APIC) to an IRQ (interrupt source). */ -u_int -apic_idt_to_irq(u_int vector) -{ - - 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)); - return (ioint_irqs[vector - APIC_IO_INTS]); -} - #ifdef DDB /* * Dump data about APIC IDT vector mappings. ==== //depot/projects/bike_sched/sys/i386/include/apicvar.h#2 (text+ko) ==== @@ -176,7 +176,6 @@ u_int apic_alloc_vector(u_int irq); void apic_enable_vector(u_int vector); void apic_free_vector(u_int vector, u_int irq); -u_int apic_idt_to_irq(u_int vector); void apic_register_enumerator(struct apic_enumerator *enumerator); void *ioapic_create(uintptr_t addr, int32_t id, int intbase); int ioapic_disable_pin(void *cookie, u_int pin);