Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Keyboard lockup with NetBSD5



Alexander Coers wrote:

> Okay, after a lot of work (and patience :-)) I finally managed to boot  
> into your 5.99.20 system.

Great!


> This is what vmstat gives me right after boot, via remote login:
> 
> interrupt                                     total     rate
> tbe/soft                                          1        0
> kbd/ports                                     28063      116
> vbl                                           14591       60
> [...]
> And this somewhat later:
> 
> interrupt                                     total     rate
> tbe/soft                                          1        0
> kbd/ports                                     34247       38
> vbl                                           53682       59

In fact your A1200 receives a lot more level2 interrupts than an A3000 or
A4000 does. I wonder where they come from. I hope you didn't type a lot
between those two measurements? ;)

My A3000 had much less interrupts after booting a kernel:
kbd/ports    5639  24

After nearly 15 minutes without typing (comparable to your 2nd vmstat-call):
kbd/ports    5913    6

After another 15 minutes I'm even reaching a rate of 2!


Ok, I made another two test kernels for you. You find them in an archive at:
  ftp://ftp.netbsd.org/pub/NetBSD/misc/phx/kbdtest2.tar.gz

Both are wscons kernels, and they try to print the name of the device which
adds a level 2 or level 6 interrupt handler, to find out which devices are
registered for those interrupts on your system.

On my A3000 I'm getting (in dmesg):
[...]
ahsc0 at mainbus0
*** add_isr ipl 2: ahsc0
[...]
ne0: 10base2, 10baseT, 10baseT-FDX, auto, default [0x00 0x70] auto
*** add_isr ipl 2: ^EM-)-M^EM-)-M^Pne0
[...]
cbiiisc0: siopng type 770 id 16 reset V1
*** add_isr ipl 2: cbiiisc0
[...]

So three devices have registered for level 2 interrupt handling: A3000-SCSI,
CSPPC-SCSI and X-Surf ethernet. That seems to be no problem, although I have
to admit hat I recently oberserved two characters being printed to the
console when I pressed the key just once. This happens very rarely, but might
be the same problem!

You get the above output with the kernel "netbsdtst1".


In the second kernel, "netbsdtst2", I'm calling the CIA-A interrupt hander
every time when a level2 interrupt comes in. In the current source (which is
unmodified since more than 10 years) it looks like this:
[...]
        case 2:
                p = &isr_ports;
                while ((q = *p) != NULL) {
                        if ((q->isr_intr)(q->isr_arg))
                                break;
                        p = &q->isr_forw;
                }
                if (q == NULL)
                        ciaa_intr ();
[...]

So when an interrupt handler from the isr_ports interrupt chain (registered
by add_isr(), see above) returns with True, the CIA-A IRQ register will not
be checked.

I wonder what happens when a keyboard interrupt occured at the same time?
Seems it will be ignored until another CIA-A interrupt happens alone? When
you have lots of ports-interrupts, as on your A1200, the probability of such
a situation increases.

Maybe there was a reason to skip ciaa_intr(), and I'm talking nonsense here,
but it might be worth a test to try the "netbsdtst2" kernel.


-- 
Frank Wille



Home | Main Index | Thread Index | Old Index