Using "Asynchronous Notifications" within an interrupt handler

From: Madhu Saravana Sibi Govindan
Date: Thu Oct 05 2006 - 20:53:34 EST


Hello all,

I'm developing a linux device driver for kernel version 2.16.15. I'm
thinking of using the "Asynchronous Notification" mechanism, explained
in the Linux Device Drivers book by Corbet and Rubini in Chapter 6,
within an interrupt handler.

The idea is: whenever the device driver receives an interrupt from the
hardware device, the interrupt handler uses this 'asynchronous
notification' mechanism to notify a user-level process of this
interrupt. The user-level process, on the other hand, is waiting for
this SIGIO signal from the device driver.

My question is: is it safe to use the asynchronous notification
mechanism within an interrupt handler? I see that this call acquires a
bunch of locks before sending the signal to the process. Would this
cause any deadlocking situations? Or should I resort to the top and
bottom half approach for interrupt handling and handle the
notification in the bottom half?

I'd be very thankful for suggestions/ideas on this topic.

Regards and thanks in advance,
G.Sibi

PS: I've posted this to os_drivers@xxxxxxxxxxxxxx too. My apologies
for the duplication.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/