On Tue, Mar 01, 2011 at 01:17:11PM +0200, Jukka Ruohonen wrote:
> On Tue, Mar 01, 2011 at 09:53:24AM +0000, Andrew Doran wrote:
> > You must not call these interfaces or any kind of MI synchronization
> > interface, spin mutexes included, with interrupts switched off at the
> > machine level!
> 
> Yes, of course. It was a bug in a code that is not yet used. Already fixed,
> will not happen again.

Thanks.  Also in case it's not clear my e-mail was
intended to convey surprise and not much else!  The interrupt restriction
is true for atomic operations also, incidentally.

I think maybe the only MI sync interfaces we have where it's 
OK to disable interrupts on the CPU are __cpu_simple_lock_t and
the memory barriers (membar).

Where the raw spinlocks are used it's a case of "all bets are off", you
need to be aware of the side effects.  E.g. there are restrictions on how
long you can hold the locks, what sort of events you can wait for and so
on.

Reply via email to