summaryrefslogtreecommitdiffstats
path: root/sys/i386/include
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2004-08-02 15:31:10 +0000
committerscottl <scottl@FreeBSD.org>2004-08-02 15:31:10 +0000
commitfb7f90d7ec95dc92cb81c6e9b8768b90f31666ad (patch)
tree57d5dd81c1fe2b9225077e5da7f427bd97983dec /sys/i386/include
parent6d68eec474cd4f3a1ce83211d9bd75025c3a62a9 (diff)
downloadFreeBSD-src-fb7f90d7ec95dc92cb81c6e9b8768b90f31666ad.zip
FreeBSD-src-fb7f90d7ec95dc92cb81c6e9b8768b90f31666ad.tar.gz
Optimize intr_execute_handlers() by combining the pic_disable_source() and
pic_eoi_source() into one call. This halves the number of spinlock operations and indirect function calls in the normal case of handling a normal (ithread) interrupt. Optimize the atpic and ioapic drivers to use inlines where appropriate in supporting the intr_execute_handlers() change. This knocks 900ns, or roughly 1350 cycles, off of the time spent servicing an interrupt in the common case on my 1.5GHz P4 uniprocessor system. SMP systems likely won't see as much of a gain due to the ioapic being more efficient than the atpic. I'll investigate porting this to amd64 soon. Reviewed by: jhb
Diffstat (limited to 'sys/i386/include')
-rw-r--r--sys/i386/include/intr_machdep.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/i386/include/intr_machdep.h b/sys/i386/include/intr_machdep.h
index d8256c9..af9e672 100644
--- a/sys/i386/include/intr_machdep.h
+++ b/sys/i386/include/intr_machdep.h
@@ -50,7 +50,7 @@ struct intsrc;
*/
struct pic {
void (*pic_enable_source)(struct intsrc *);
- void (*pic_disable_source)(struct intsrc *);
+ void (*pic_disable_source)(struct intsrc *, int);
void (*pic_eoi_source)(struct intsrc *);
void (*pic_enable_intr)(struct intsrc *);
int (*pic_vector)(struct intsrc *);
@@ -61,6 +61,12 @@ struct pic {
enum intr_polarity);
};
+/* Flags for pic_disable_source() */
+enum {
+ PIC_EOI,
+ PIC_NO_EOI,
+};
+
/*
* An interrupt source. The upper-layer code uses the PIC methods to
* control a given source. The lower-layer PIC drivers can store additional
OpenPOWER on IntegriCloud