From owner-freebsd-current@FreeBSD.ORG Wed Jun 16 22:44:17 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6984316A4CE for ; Wed, 16 Jun 2004 22:44:17 +0000 (GMT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id B40DD43D49 for ; Wed, 16 Jun 2004 22:44:16 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru id i5GMf9Gg069850 for freebsd-current@freebsd.org.checked; (8.12.8/vak/2.1) Thu, 17 Jun 2004 02:41:09 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (rik.cronyx.ru [172.22.4.1]) by hanoi.cronyx.ru with ESMTP id i5GMdWrH069764; (8.12.8/vak/2.1) Thu, 17 Jun 2004 02:39:33 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <40D0CABA.1020101@cronyx.ru> Date: Thu, 17 Jun 2004 02:33:30 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030426 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: Bruce Evans References: <40D070B7.5000009@cronyx.ru> <20040617080547.F8883@gamplex.bde.org> In-Reply-To: <20040617080547.F8883@gamplex.bde.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: How to catch interrupt X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2004 22:44:17 -0000 Bruce Evans: >On Wed, 16 Jun 2004, Roman Kurakin wrote: > > >> How to catch interrupt for ISA device before registering handler for it? >> >> > >This cannot be done without duplicating lots of interrupt handler >registration code. (Actually only a little for a quick MD hack: just >setidt() to point to an interrupt handler, plus enabling the ICU^WPIC, >plus changing the normal code to not un-enable the PIC. npx.c still >does something like this in RELENG_4.) > >However, you may only need to test for pending interrupts. This can >be done for isa interrupts using isa_irq_pending() to get a bitmap of > It seems that this function is not working for interrupts that were already used by some driver before I call it. rik >pending irqs. See sio.c. On i386's there are also some newer harder >to use even less portable interfaces for determining pending irqs. >See i386/include/intr_machdep.h. > >Bruce > > > >