Blocking functions and interrupt protection

gguevel gguevel at
Tue Jan 29 05:29:37 EST 2002


I works on an embedded linux ppc pci target board in a linux PC.

I have a process on the PC  which sends ioctl commands to the target via a
in a pci doorbell register then sleeps on. The target must reply with a pci

The problem is that the target replies so fast that if the process is
interrupted between the
doorbell write function and the sleep function, the interrupt event from the
target may try to
awake a process which is not sleeping. The event is lost and the ioctl
command is locked

How can I protect the process to be interrupted between the start of the
doorbell write
function and the end of the sleep function.

This problem is a general case, not specific to my driver. It may happen in
all drivers wich
communicates with fast board which generates asynchronous interrupt events.

Any help would be welcome.

Sorry for my poor english language.

Gérard Guével

** Sent via the linuxppc-embedded mail list. See

More information about the Linuxppc-embedded mailing list