Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jul 2006 00:13:20 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 100370 for review
Message-ID:  <200607010013.k610DK66099342@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607010013.k610DK66099342>