Subject: Re: Race condition in generic soft interrupts code?
To: None <Richard.Earnshaw@arm.com>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: port-arm
Date: 07/17/2003 17:20:02
On Monday, July 14, 2003, at 02:50 PM, Richard Earnshaw wrote:
> In trying to port the generic soft-ints code to the Integrator board
> I've
> been running into a race condition that can lead to particular
> interrupts
> becoming permanently blocked, even though the SPL level is 0 and the
> processor is sitting in the idle loop. The main symptom is that
> XXX_ipending has a bit set, and the corresponding bit in intr_enabled
> is
> zero, so the interrupt is permanently blocked. Here is how I think
> this
> can happen:
Yah, your analysis is right... However, if you take a look at the
XScale ports that use it, you'll see that they already take care of the
problem. See line 515 of i80321_icu.c for an example of a platform
that tracks softintrs using software only, or line 504 of becc_icu.c
that uses hardware assist for softintrs.
Patching it as you suggest could also work (and, depending on the
hard/soft interrupt glue, could be more efficient).
-- Jason R. Thorpe <thorpej@wasabisystems.com>