Skip to content

irqdomain/debugfs: Fix uses of irq_domain_alloc_fwnode

Marc Zyngier lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8irqchip/gic-v3: Register the distributor's PA instead of its VA in fwnodedrivers/irqchip/irq-gic-v3.c+1 -10 replies
2/8irqchip/gic-v3-its: Register the ITS' PA instead of its VA in fwnodedrivers/irqchip/irq-gic-v3-its.c+1 -10 replies
3/8irqchip/gic: Register the distributor's PA instead of its VA in fwnodedrivers/irqchip/irq-gic.c+1 -10 replies
4/8irqchip/gic-v2m: Register the frame's PA instead of its VA in fwnodedrivers/irqchip/irq-gic-v2m.c+1 -10 replies
5/8irqchip/ixp4xx: Register the base PA instead of its VA in fwnodedrivers/irqchip/irq-ixp4xx.c+1 -10 replies
6/8gpio/ixp4xx: Register the base PA instead of its VA in fwnodedrivers/gpio/gpio-ixp4xx.c+1 -11 reply
7/8PCI: hv: Allocate a named fwnode instead of an address-based onedrivers/pci/controller/pci-hyperv.c+9 -11 reply
8/8irqdomain/debugfs: Use PAs to generate fwnode namesinclude/linux/irqdomain.h kernel/irq/irqdomain.c+8 -70 replies

Reviews trailers per patch

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

PatchLinus WalleijThomas Gleixner
SeriesA-b
1/8
2/8
3/8
4/8
5/8
6/8R-b
7/8
8/8

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/8] irqdomain/debugfs: Fix uses of irq_domain_alloc_fwnode

I recently noticed that all irq_domain_alloc_fwnode were passing a VA to it, which is unfortunate as this is designed to appear in debugfs (and we don't like to leak VAs). Disaster was avoided thanks to our ____ptrval____ friend, but it remains that the whole thing is pretty useless if you have more than a single domain (they all have the same name and creation fails).

In order to sort it out, change all users of irq_domain_alloc_fwnode to pass the PA of the irqchip the domain will be associated with. One notable exception is the HyperV PCI controller driver which has no PA to associate with. This is solved by using a named fwnode instead, using the device GUID.

Finally, irq_domain_alloc_fwnode() is changed to pa a pionter to a PA, which can be safely advertised in debugfs.

Marc Zyngier (8):
irqchip/gic-v3: Register the distributor's PA instead of its VA in
fwnode
irqchip/gic-v3-its: Register the ITS' PA instead of its VA in fwnode irqchip/gic: Register the distributor's PA instead of its VA in fwnode irqchip/gic-v2m: Register the frame's PA instead of its VA in fwnode irqchip/ixp4xx: Register the base PA instead of its VA in fwnode gpio/ixp4xx: Register the base PA instead of its VA in fwnode
PCI: hv: Allocate a named fwnode instead of an address-based one irqdomain/debugfs: Use PAs to generate fwnode names

 drivers/gpio/gpio-ixp4xx.c          |  2 +-
 drivers/irqchip/irq-gic-v2m.c       |  2 +-
 drivers/irqchip/irq-gic-v3-its.c    |  2 +-
 drivers/irqchip/irq-gic-v3.c        |  2 +-
 drivers/irqchip/irq-gic.c           |  2 +-
 drivers/irqchip/irq-ixp4xx.c        |  2 +-
 drivers/pci/controller/pci-hyperv.c | 10 +++++++++-
 include/linux/irqdomain.h           |  6 +++---
 kernel/irq/irqdomain.c              |  9 +++++----
 9 files changed, 23 insertions(+), 14 deletions(-)
Signature · 1 line
2.20.1