Subject: IRQ questions

From: Scott A McConnell <[email-masked]>
Date: Fri, 20 Apr 2001 11:37:24 -0700

I am trying to hunt down what I believe is an IRQ problem associated
with my serial driver.

I guess I am using old style interrupts.

In 2.4.0-test 5 the file arch/mips/kernel/irq.c used to be built. Under
2.4.3 it no longer is. However, it appears it was renamed to old_irg.c
and a new irq.c was created. I also noticed that an i8259.c files was
added at some point. However, it does not seem to match the code that
was in irq.c.

Are there any notes available that explain how to convert from old style
IRQ's to new?
What are we suppose to do with the new irq.c which is not being used?

I have a 2.4.3 kernel booting. I copied the old  arch/mips/kernel/irq.c
to my target directory and changed
a few other things to get everything to compile. As long as I do not try
to use a serial port everything seems to be working.  I booted with a
frame buffer and started X.  The mouse and keyboard worked so some of my
IRQ's appear to be working.

When I start the serial port things seem to go fine untile it trys to
write the port at which point it starts running very slowly. Which is
what make me think the kernel is being overcome with interrupts.

Thanks for any thoughts or advice.

Scott

---

From: Ralf Baechle <[email-masked]>
Date: Fri, 20 Apr 2001 19:00:17 -0300

> added at some point. However, it does not seem to match the code that

Not entirely, yet.  The idea is that a board can register a structure
containing information on how to handle an interrupt with the new irq.c
So a board which has PC-style i8259 PICs could call init_i8259_irqs
which in turn would register handlers for the interrupts 0 - 15 which
would be handle in i8259; handler for other interrupts controllers could
be registered also.

> What are we suppose to do with the new irq.c which is not being used?

The IRQ changes should be considered work in progress; until the new
interrupt code you should just follow the example given by the many
existing implementations.

> to my target directory and changed

One valid solution ...  Still.  We want to eleminate all this code
duplication for no good reason.

> what make me think the kernel is being overcome with interrupts.

Or you don't receive interrupts at all.

  Ralf

---

From: Scott A McConnell <[email-masked]>
Date: Mon, 23 Apr 2001 16:21:38 -0700

> duplication for no good reason.

Would Rotten_IRQ have done the same thing?

Could you name an arch in the cvs distribution that uses the new style IRQ's

Thanks,
Scott

---

From: Ralf Baechle <[email-masked]>
Date: Mon, 23 Apr 2001 18:48:35 -0300

> Would Rotten_IRQ have done the same thing?

Absolutely not.  The rotten IRQ thing gives you the old irq.c which assumes
more or less x86 centric interrupt handling, that is a 2 PICs and doesn't
get SMP right and leaves us a ton of structural problems.  Don't use, it's
destilled evil ;-)

> Could you name an arch in the cvs distribution that uses the new style IRQ's

Interrupt handling is an per architecture thing; currently i386 is coming
closest to the new design of our future interrupts.

  Ralf

---

From: Scott A McConnell <[email-masked]>
Date: Tue, 24 Apr 2001 07:38:06 -0700

Jun & Ralf,

Thanks for the info.

I will dig into the code that Jun provided.

Jun, I noticed the new/old time code with the last update. It is on my TODO list. Thanks for taking the time
to point it out and writing the README.

Scott