linux/drivers/iio
Xander Huff 70581e0ef8 iio: adc: xilinx-xadc: Push interrupts into hardirq context
The driver currently registers a pair of irq handlers using
request_threaded_irq(), however the synchronization mechanism between the
hardirq and the threadedirq handler is a regular spinlock.

Unfortunately, this breaks PREEMPT_RT builds, where a spinlock can sleep,
and is thus not able to be acquired from a hardirq handler. This patch gets
rid of the threaded handler and pushes all interrupt handling into the
hardirq context, and uses request_irq().

To validate that this change has no impact on RT performance, here are
cyclictest values with no processes running:

$ sudo cyclictest -S -m -p 98
policy: fifo: loadavg: 0.00 0.01 0.05 1/174 2539
T: 0 ( 1405) P:98 I:1000 C:167010520 Min: 9 Act: 12 Avg: 12 Max: 75
T: 1 ( 1862) P:98 I:1500 C:111340339 Min: 9 Act: 12 Avg: 12 Max: 73

Then, all xadc raw handles were accessed in a continuous loop via
/sys/bus/iio/devices/iio:device0:

$ sudo cyclictest -S -m -p 98
policy: fifo: loadavg: 7.84 7.70 7.63 3/182 4260
T: 0 ( 2559) P:98 I:1000 C:241557018 Min: 11 Act: 18 Avg: 21 Max: 74
T: 1 ( 2560) P:98 I:1500 C:161038006 Min: 10 Act: 21 Avg: 20 Max: 73

Signed-off-by: Xander Huff <xander.huff@ni.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-08-16 10:51:27 +01:00
..
accel iio: st_sensors: add debugfs register read hook 2015-08-16 10:51:25 +01:00
adc iio: adc: xilinx-xadc: Push interrupts into hardirq context 2015-08-16 10:51:27 +01:00
amplifiers iio: amplifiers: ad8366: Use right order for type specification 2015-01-01 12:16:57 +00:00
buffer iio: Move generic buffer implementations to sub-directory 2015-08-16 10:51:21 +01:00
common iio: st_sensors: add debugfs register read hook 2015-08-16 10:51:25 +01:00
dac Merge 4.2-rc3 into staging-next 2015-07-20 13:21:28 -07:00
frequency iio: frequency: adf4350: Delete blank line 2015-07-11 18:28:04 +01:00
gyro iio: st_sensors: add debugfs register read hook 2015-08-16 10:51:25 +01:00
humidity iio: dht11: Use new function ktime_get_resolution_ns() 2015-07-20 18:41:20 +01:00
imu Second set of new device support, features and cleanup for the 4.3 cycle. 2015-08-12 12:43:41 -07:00
light iio:light:stk3310: adjust indentation 2015-08-12 22:17:23 +01:00
magnetometer iio: st_sensors: add debugfs register read hook 2015-08-16 10:51:25 +01:00
orientation iio: orientation: hid-sensor-rotation: Fix memory leak in probe() 2015-05-17 09:10:25 +01:00
pressure iio: st_sensors: add debugfs register read hook 2015-08-16 10:51:25 +01:00
proximity iio: sx9500: Add missing init in sx9500_buffer_pre{en,dis}able() 2015-07-19 11:48:17 +01:00
temperature Second set of new device support, features and cleanup for the 4.3 cycle. 2015-08-12 12:43:41 -07:00
trigger iio: trigger: Add a blank line after declarations 2014-12-26 12:15:36 +00:00
Kconfig iio: Move generic buffer implementations to sub-directory 2015-08-16 10:51:21 +01:00
Makefile iio: Move generic buffer implementations to sub-directory 2015-08-16 10:51:21 +01:00
iio_core.h iio: Move buffer registration to the core 2014-12-12 12:28:31 +00:00
iio_core_trigger.h iio: fix semicolon in io_core_trigger.h 2013-08-03 18:40:32 +01:00
industrialio-buffer.c iio: industrialio-buffer: Fix iio_buffer_poll return value 2015-08-12 19:26:34 +01:00
industrialio-core.c iio: percolate error if event fd fails 2015-08-16 10:51:26 +01:00
industrialio-event.c iio: event: Remove negative error code from iio_event_poll 2015-08-12 19:26:39 +01:00
industrialio-trigger.c iio: trigger: Add missing fields in kernel docs 2015-08-08 12:45:49 +01:00
inkern.c First round of IIO new drivers, cleanups and functionality for the 3.20 cycle take 2 2015-01-21 10:13:37 +08:00