iio_trigger_poll from IRQ thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 

I'm currently trying to call iio_trigger_poll from the bottom-half of an interrupt handler and get the following waring;

[  101.814234] WARNING: CPU: 0 PID: 1204 at kernel/irq/handle.c:152 __handle_irq_event_percpu+0x234/0x238
[  101.814255] irq 60 handler irq_default_primary_handler+0x0/0x1c enabled interrupts
[  101.814268] Modules linked in: ade9078 cmac rfcomm bnep hci_uart btbcm bluetooth ecdh_generic ecc fuse 8021q garp brcmfmac brcmutil cfg80211 v3d rfkill spi_bcm2835 gpu_sched raspberrypi_hwmon bcm2835_codec(C) snd_bcm2835(C) bcm2835_v4l2(C) bcm2835_isp(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) vc_sm_cma(C) rpivid_mem vc4 uio_pdrv_genirq uio i2c_dev ip_tables x_tables
[  101.814452] CPU: 0 PID: 1204 Comm: irq/58-ade9078 Tainted: G         C        5.4.83-v7l+ #7

This warning occurs only once, the first time it goes through this scenario, on a second passing through it I get no warning.
After reading online about it, the problem is related to disabling the interrupts prior to entering the IIO Handler. 
By doing this manually I don't get any Warnings, but it has been pointed out to me that this might not be a good solution.

I'm using the bottom-half of the handler because the interrupt requires reading the status register of the IC, which can be slow.
Unfortunately there is no way to insert the iio_trigger_poll in the top-half because all the checks are done in the bottom-half.

The trigger_handler reads the samples from an internal FIFO in the IC, I'm not sure if this detail is relevant or not. 

Regards,
Ciprian




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux