linux-mips-fnet
[Top] [All Lists]

DECstation Interrupts

To: linux-mips@fnet.fr
Subject: DECstation Interrupts
From: Harald Koerfgen <harald.koerfgen@netcologne.de>
Date: Tue, 23 Jun 1998 21:25:47 +0200 (MEST)
Organization: none
Reply-to: "Harald Koerfgen" <harald.koerfgen@netcologne.de>
Sender: harry@franz.no.dom
Hello all,

I'm back :-).

Beeing away for nearly a week from this list, I am glad to see that things
are beginning to move.

There have been a few questions about interrupts last week I'll try to
answer a few of them, because this is obviously essential for any device
driver.

When it comes to interrupts all DECstations are completely different from
each other. I would like to hide these differences and created a unified
interrupt handler, which has to be as general as possible and, of course, as
fast as possible. The basic idea is to assign each possible interrupt a
number and leave the rest to the higher layers. I suggest to have a look at
arch/mips/dec/int-handler.S, arch/mips/dec/setup.c and arch/mips/dec/irq.c.

However, there is still one problem left. On some DECstations, some
interrupts are directly handled by the CPU, and the CPU's interrupt mask is
part of the CP0 Status Register, which is saved with save_flags(flags).

That means that code like:

        save_and_cli(flags);
        ...
        unmask_irq(irq);
        ...
        restore_flags(flags);

doesn't work on DECstations. I have used a bad hack in arch/mips/dec/irq.c
to get around this, and this may be the point why Florian has experienced
strange phaenomenons with his PMAZ-AA driver. Sorry, but I haven't got an
*elegant* solution for this right now, masking out the interrupt mask in
restore_flags(flags) seems is logical, but would make it slow like hell.
 
Anyway, you don't have to care about the details behind this. If you need
an interrupt for you driver, simply include
include/asm-mips/dec/interrupts.h and use the constants defined there, for
example:

        #include <asm/dec/interrupts.h>

        ...

        request_irq(TC0, ...);

to request an irq for TURBOchannel slot 0. Please beware, due toe the way I
implemented the interrupt handler, some interrupts may have more than one
cause. You may want to have a look at include/asm-mips/dec/interrupts.h
itself.

If you have further questions, feel free to ask me.

Keep hacking.
---
Regards,
Harald

<Prev in Thread] Current Thread [Next in Thread>
  • DECstation Interrupts, Harald Koerfgen <=