Skip to content

irq: generic-chip: resource management improvements

Bartosz Golaszewski lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5irq: generic-chip: provide irq_free_generic_chip()include/linux/irq.h+6 -00 replies
2/5irq: generic-chip: provide irq_destroy_generic_chip()include/linux/irq.h+8 -00 replies
3/5irq: generic-chip: export irq_init_generic_chip() locallykernel/irq/generic-chip.c kernel/irq/internals.h+14 -40 replies
4/5irq: generic-chip: provide devm_irq_alloc_generic_chip()Documentation/driver-model/devres.txt include/linux/irq.h kernel/irq/devres.c+40 -00 replies
5/5irq: generic-chip: provide devm_irq_setup_generic_chip()Documentation/driver-model/devres.txt include/linux/irq.h kernel/irq/devres.c+56 -00 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMarc Zyngier
SeriesA-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] irq: generic-chip: resource management improvements

This series is a follow-up to [1].

Some users of irq_alloc_generic_chip() are modules which can be removed (e.g. gpio-ml-ioh) but have no means of freeing the allocated generic chip.

Last time it was suggested to provide irq_destroy_generic_chip() which would undo both irq_remove_generic_chip() and irq_alloc_generic_chip().

This functionality is provided by patch 2/5 with 1/5 adding the option to only free the allocated memory.

Patch 3/5 exports a function that will be used in the devres variant of irq_alloc_generic_chip().

Patches 4/5 and 5/5 add resource managed versions of irq_alloc_generic_chip() & irq_setup_generic_chip(). They will be used in drivers where applicable. Device resources are released in reverse order so it's ok to call devm_irq_alloc_generic_chip() and then devm_irq_setup_generic_chip().

[1] https://lkml.org/lkml/2017/3/8/550

Bartosz Golaszewski (5):
irq: generic-chip: provide irq_free_generic_chip()
irq: generic-chip: provide irq_destroy_generic_chip()
irq: generic-chip: export irq_init_generic_chip() locally
irq: generic-chip: provide devm_irq_alloc_generic_chip()
irq: generic-chip: provide devm_irq_setup_generic_chip()

 Documentation/driver-model/devres.txt |  2 +
 include/linux/irq.h                   | 22 +++++++++
 kernel/irq/devres.c                   | 86 +++++++++++++++++++++++++++++++++++
 kernel/irq/generic-chip.c             |  7 ++-
 kernel/irq/internals.h                | 11 +++++
 5 files changed, 124 insertions(+), 4 deletions(-)
Signature · 1 line
2.9.3