Subject: soft interrupts
To: None <port-macppc@NetBSD.org>
From: Donald Lee <donlee@icompute.com>
List: port-macppc
Date: 04/20/2001 08:33:25
Dear smart people of the list,

Don Qixote here.  I'm still tilting at serial ports.  Tom Winchester's
e-mail has spurred me to  write.

I have the Cyclades serial card working, with one remaining problem, that
it "drops" interrupts.  I'd like to try to fix this by changing the design
of the driver slightly.

Right now, the hardware interrupt handler does a lot of work, and I want to
change it so that it does little more than trigger a "soft" interrupt
and go home.  The soft interrupt can do the work.
I realize that the overhead of this is substantial, but
I at least want to try it.

The theory is that the long time it spends in the HW handler is somehow
interrupt masked, and if another interrupt comes in, it gets confused.
If I reduce the time under mask, it should at least improve the
behavior.

The current system uses the
callout table to poll on every tick -yuck!  Besides being inefficient
and excessive, it also is inadequate, because 16 ms is too long to wait
sometimes.

My problem is that I can't figure out how to "properly" generate a
call to a "soft" interrupt handler.  I've looked over the zs8530
serial code, and figured out ( I think) how to generate a setsoftserial()
interrupt, but I don't know the rules for setting up my own.

Could someone pretty please send me some doc pointers, code pointers,
or a few paragraphs describing how to do this "properly"?  I'll respond
with work on the built-in serial ports, possibly fixing them.

Thanks,

-dgl-