From 65aeca4e8c04581896ff2d5844a33e63d17b5094 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sat, 16 Apr 2011 00:40:59 +0000 Subject: More than a decade ago, interrupt handlers on sparc started returning 0 (interrupt was not for me), 1 (positive interrupt was for me), or -1 (i am not sure...). We have continued with this practice in as many drivers as possible, throughout the tree. This makes some of the architectures use that information in their interrupt handler calling code -- if 1 is returned (and we know this specific machine does not have edge-shared interrupts), we finish servicing other possible handlers on the same pin. If the interrupt pin remains asserted (from a different device), we will end up back in the interrupt servicing code of course... but this is cheaper than calling all the chained interrupts on a pin. This does of course count on shared level interrupts being properly sorted by IPL. There have been some concerns about starvation of drivers which incorrectly return 1. Those drivers should be hunted down so that they return -1. ok and help from various people. In snaps for about a week now. --- sys/arch/i386/include/psl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/arch/i386/include') diff --git a/sys/arch/i386/include/psl.h b/sys/arch/i386/include/psl.h index 39b93d748d7..ad7101c3c3e 100644 --- a/sys/arch/i386/include/psl.h +++ b/sys/arch/i386/include/psl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: psl.h,v 1.17 2011/03/23 16:54:35 pirofti Exp $ */ +/* $OpenBSD: psl.h,v 1.18 2011/04/16 00:40:58 deraadt Exp $ */ /* $NetBSD: psl.h,v 1.30 1996/05/13 01:28:05 mycroft Exp $ */ /*- @@ -91,6 +91,8 @@ struct intrhand { struct evcount ih_count; }; +extern int intr_shared_edge; /* This system has shared edge interrupts */ + #endif /* _LOCORE */ #endif /* _KERNEL */ -- cgit v1.2.3