Skip to contentSkip to conversation

iio: dummy: evgen: use irq_sim

PATCH In review Bartosz Golaszewski 3 participants 4 messages Sep 28, 2017 – Oct 1, 2017 IIO

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 iio: dummy: evgen: use irq_sim

Switch to using the recently added interrupt simulator for dummy irqs.

---
bloat-o-meter output:
add/remove: 0/3 grow/shrink: 1/5 up/down: 12/-540 (-528)

function                                     old     new   delta
iio_dummy_evgen_get_irq                      136     148     +12
iio_evgen_release                             40      36      -4
iio_dummy_evgen_get_regs                      32      28      -4
iio_dummy_work_handler                        20       -     -20
iio_dummy_event_irqunmask                     32       -     -32
iio_dummy_event_irqmask                       32       -     -32
iio_evgen_poke                               140     100     -40
init_module                                  376     172    -204
iio_dummy_evgen_init                         376     172    -204

Total: Before=2804, After=2276, chg -18.83%

v1 -> v2:
- added a missing kfree()

 drivers/iio/dummy/Kconfig           |  2 +-
 drivers/iio/dummy/iio_dummy_evgen.c | 89 ++++++++-----------------------------
 2 files changed, 20 insertions(+), 71 deletions(-)
drivers/iio/dummy/Kconfig +1 -1
index aa5824d96a43..5a29fbd3c531 100644
@@ -5,7 +5,7 @@ menu "IIO dummy driver"
 	depends on IIO
 
 config IIO_DUMMY_EVGEN
-	select IRQ_WORK
+	select IRQ_SIM
 	tristate
 
 config IIO_SIMPLE_DUMMY
drivers/iio/dummy/iio_dummy_evgen.c +19 -70

147 lines not on this page · raw message

Signature · 1 line
2.13.2
Reviewed-by Tested-by on v2 1/1
#1 lore raw
Quoted 3 lines · Bartosz Golaszewski

Switch to using the recently added interrupt simulator for dummy irqs.

I've backported irq_sim to v4.9 for testing and got compile errors due to a missing slab.h include. In upstream this include comes implicit through irq.h (coincidentally added by you), I wonder if we should still add it to irq_sim.c since it is explicitly using the allocation API.

#2 lore raw

2017-09-29 15:15 GMT+02:00 Lars-Peter Clausen <[email protected]>:

Quoted 5 lines · Bartosz Golaszewski
Quoted 3 lines

Switch to using the recently added interrupt simulator for dummy irqs.

Quoted 7 lines

I've backported irq_sim to v4.9 for testing and got compile errors due to a missing slab.h include. In upstream this include comes implicit through irq.h (coincidentally added by you), I wonder if we should still add it to irq_sim.c since it is explicitly using the allocation API.

Thanks for the hint, I'll send it together with other updates (e.g. the reverse irq lookup).

maintainer
#3 lore raw
Quoted 9 lines · On Fri, 29 Sep 2017 16:52:26 +0200 Bartosz Golaszewski <[email protected]> wrote:

2017-09-29 15:15 GMT+02:00 Lars-Peter Clausen <[email protected]>:

Quoted 8 lines · Bartosz Golaszewski
Quoted 3 lines

Switch to using the recently added interrupt simulator for dummy irqs.

Quoted 7 lines
Quoted 4 lines

I've backported irq_sim to v4.9 for testing and got compile errors due to a missing slab.h include. In upstream this include comes implicit through irq.h (coincidentally added by you), I wonder if we should still add it to irq_sim.c since it is explicitly using the allocation API.

Thanks for the hint, I'll send it together with other updates (e.g. the reverse irq lookup).

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html