Subject: Re: results of the IRC debug patch
To: Michael <macallan18@earthlink.net>
From: Tim Kelly <hockey@dialectronics.com>
List: port-macppc
Date: 12/04/2004 13:20:57
At 1:12 PM -0500 12/4/04, Michael wrote:
>> be blocked like IPL_BIO. Additionally, if the mouse event comes in
>> rentrantly, the irq for that entire hardware device gets turned off until
>> do_pending_int turns it back on.
>... which doesn't seem to happen.
>Hmm, I should really read some code :)

Check to see if that the patch you're using has enabling the gc hardware
irq after the kernel lock is acquired and released, as is already done with
openpic. I did that to match what man(9) lock says and was in the patch I
posted for the MP stuff and the earlier virq post. As we already discussed
offline:

              For a simplelock to be used in an interrupt handler, care
              must be taken to disable the interrupt, acquire the lock, do any
              processing, release the simplelock and re-enable the interrupt.
              This procedure is necessary to avoid deadlock between the inter-
              rupt handler and other threads executing on the same processor.

I suppose that technically the interrupt handler is not trying to acquire
the simple lock, but the simple lock is acquired and held around the
interrupt handler's execution. I would think moving enabling the interrupt
to after the handler has completed and the lock released would no disturb
anything (it hasn't here).

tim