Date: Sat, 1 Jul 2006 00:24:36 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100373 for review Message-ID: <200607010024.k610OaUl099821@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100373 Change 100373 by peter@peter_work on 2006/07/01 00:24:00 Eliminate a call to intr_lookup_source() in the critical code paths which collapses to a function index operation. Just do the array lookup. Also, include prototype change for intr_execute_handlers() to include the vector argument. Affected files ... .. //depot/projects/bike_sched/sys/i386/i386/intr_machdep.c#4 edit .. //depot/projects/bike_sched/sys/i386/i386/local_apic.c#4 edit .. //depot/projects/bike_sched/sys/i386/include/intr_machdep.h#2 edit Differences ... ==== //depot/projects/bike_sched/sys/i386/i386/intr_machdep.c#4 (text+ko) ==== @@ -60,9 +60,10 @@ typedef void (*mask_fn)(void *); static int intrcnt_index; -static struct intsrc *interrupt_sources[NUM_IO_INTS]; static struct mtx intr_table_lock; +struct intsrc *interrupt_sources[NUM_IO_INTS]; + #ifdef SMP static int assign_cpu; ==== //depot/projects/bike_sched/sys/i386/i386/local_apic.c#4 (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(ioint_irqs[vector - APIC_IO_INTS]); + isrc = interrupt_sources[ioint_irqs[vector - APIC_IO_INTS]]; intr_execute_handlers(isrc, vector, &frame); } ==== //depot/projects/bike_sched/sys/i386/include/intr_machdep.h#2 (text+ko) ==== @@ -109,6 +109,8 @@ u_int is_enabled:1; }; +extern struct intsrc *interrupt_sources[NUM_IO_INTS]; + struct trapframe; extern struct mtx icu_lock; @@ -128,7 +130,8 @@ void *arg, enum intr_type flags, void **cookiep); int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); -void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); +void intr_execute_handlers(struct intsrc *isrc, u_int vector, + struct trapframe *frame); struct intsrc *intr_lookup_source(int vector); int intr_register_source(struct intsrc *isrc); int intr_remove_handler(void *cookie);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607010024.k610OaUl099821>