lkml.org 
[lkml]   [1998]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: input from 0x21 during interrupt handling (2.0.* and 2.1.*)
On Wed, 10 Jun 1998, Philip Gladstone wrote:

> There is a a dummy input instruction in the interrupt handlers
> that reads a byte from 0x21 (or 0xa1). There is a comment in the
> 2.0.* tree that says if it is missing then older hard disks don't
> work. In 2.1.* there is just a DUMMY comment.
>
> Does anyone know why this is required -- and for which systems?

Yes. A byte input or output from a port takes 200ns. Not 600ns. With
one "wait" state it is almost exactly 300ns.

The interrupt controller is of a very old design. It takes time for
its internal state-machine to settle. You are just about to ACK the
interrupt that occurred on some "level". You need to make sure that
the slow internal workings are ready or you will fail to reset its
in-service latch. This means that you will get no further interrupts
on that level.

The problem is exacerbated since the kernel uses the "non-specific"
EOI for practically everything, i.e., 0x20. This ACKs the current
highest-pending interrupt, which is not always what you want because
the controller's input bits may be changing as you ACK the interrupt.

It was I who changed the cascade interrupt to use the specific EOI.
This solved a problem with several i386's not working on all the
high interrupt levels.

I also attempted to rework the code to use specific EOI's for everything.
The machine would work for several days then hang with no timer-channel
0 interrupt (needed for preemption).

What exists in the kernel is something that works. You can't make it
better by re-reading the data sheets. If you remove the dummy IN (used
for delay), you will find that your machine still works fine. You
will think that you improved something. However, many other machines
will not work.

Newer SMP boards will not use that controller at all. They use the APIC
chip for hardware interrupts and, since they can be level-controlled,
interrupt lines can be shared.

Cheers,
Dick Johnson
***** FILE SYSTEM MODIFIED *****
Penguin : Linux version 2.1.105 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.048 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site