Subject: Re: Interrupt types
To: Martin Husemann <martin@rumolt.teuto.de>
From: Leo Weppelman <leo@wau.mis.ah.nl>
List: tech-kern
Date: 11/25/1998 17:12:09
On Mon 09 Nov 1998, Martin Husemann wrote:
> Now the i386 isa bus only supports IST_EDGE. This is a restriction of the
> bus's implementation on this plattform, which is not shared by isa bus 
> implementations on the atari (and probably on the amiga). The atari isa
> bus uses level triggered interrupts...

Just for the record, the atari uses edge-triggered interrupts, the amiga
edge...

> There currently seems no way to derive the supported interrupt types from
> the bus framework. The comments on isa_intrestablish suggest to panic
> on an unsupported interrupt type - so there is not even a way to fall back
> to other interrupt types if the driver could handle that (which in our case
> would be realy easy).

There doesn't seem to be much interest in this item, but I really like to
change the comment in isavar.h, so at least the future direction is clear.
My suggestion is:

  /*
   * ISA interrupt handler manipulation.
   *
   * To establish an ISA interrupt handler, a driver calls isa_intr_establish()
   * with the interrupt number, type, level, function, and function argument of
   * the interrupt it wants to handle.  Isa_intr_establish() returns an opaque
   * handle to an event descriptor if it succeeds, and returns NULL on failure.
   * (XXX: some drivers can't handle this, since the former behaviour was to
   * invoke panic() on failure). When the system does not accept any of the
   * types supported by the driver, the driver should fail the attach.
   * Interrupt handlers should return 0 for "interrupt not for me", 1  for
   ...

If this is agreed upon [ btw. I couldn;t find a piece of this regarding pci.. ]
the isdn4bsd package could adapt this and move on ;-)

Leo.