linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] irqdomain/debugfs: Fix uses of irq_domain_alloc_fwnode
@ 2019-08-06 14:57 Marc Zyngier
  2019-08-06 14:57 ` [PATCH 1/8] irqchip/gic-v3: Register the distributor's PA instead of its VA in fwnode Marc Zyngier
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Marc Zyngier @ 2019-08-06 14:57 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Linus Walleij, Imre Kaloz, Krzysztof Halasa, K. Y. Srinivasan,
	Haiyang Zhang, Stephen Hemminger, Sasha Levin, Lorenzo Pieralisi,
	Bjorn Helgaas, linux-kernel

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(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-08-07 13:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-06 14:57 [PATCH 0/8] irqdomain/debugfs: Fix uses of irq_domain_alloc_fwnode Marc Zyngier
2019-08-06 14:57 ` [PATCH 1/8] irqchip/gic-v3: Register the distributor's PA instead of its VA in fwnode Marc Zyngier
2019-08-06 14:57 ` [PATCH 2/8] irqchip/gic-v3-its: Register the ITS' " Marc Zyngier
2019-08-06 14:57 ` [PATCH 3/8] irqchip/gic: Register the distributor's " Marc Zyngier
2019-08-06 14:57 ` [PATCH 4/8] irqchip/gic-v2m: Register the frame's " Marc Zyngier
2019-08-06 14:57 ` [PATCH 5/8] irqchip/ixp4xx: Register the base " Marc Zyngier
2019-08-06 14:57 ` [PATCH 6/8] gpio/ixp4xx: " Marc Zyngier
2019-08-07 12:41   ` Linus Walleij
2019-08-06 14:57 ` [PATCH 7/8] PCI: hv: Allocate a named fwnode instead of an address-based one Marc Zyngier
2019-08-07 13:02   ` Marc Zyngier
2019-08-06 14:57 ` [PATCH 8/8] irqdomain/debugfs: Use PAs to generate fwnode names Marc Zyngier
2019-08-07 13:19 ` [PATCH 0/8] irqdomain/debugfs: Fix uses of irq_domain_alloc_fwnode Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).