linux/kernel/irq
Marc Zyngier ad3aedfbb0 genirq/irqdomain: Allow irq domain aliasing
It is not uncommon (at least with the ARM stuff) to have a piece
of hardware that implements different flavours of "interrupts".
A typical example of this is the GICv3 ITS, which implements
standard PCI/MSI support, but also some form of "generic MSI".

So far, the PCI/MSI domain is registered using the ITS device_node,
so that irq_find_host can return it. On the contrary, the raw MSI
domain is not registered with an device_node, making it impossible
to be looked up by another subsystem (obviously, using the same
device_node twice would only result in confusion, as it is not
defined which one irq_find_host would return).

A solution to this is to "type" domains that may be aliasing, and
to be able to lookup an device_node that matches a given type.
For this, we introduce irq_find_matching_host() as a superset
of irq_find_host:

struct irq_domain *irq_find_matching_host(struct device_node *node,
                                enum irq_domain_bus_token bus_token);

where bus_token is the "type" we want to match the domain against
(so far, only DOMAIN_BUS_ANY is defined). This result in some
moderately invasive changes on the PPC side (which is the only
user of the .match method).

This has otherwise no functionnal change.

Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: Yijing Wang <wangyijing@huawei.com>
Cc: Ma Jun <majun258@huawei.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Duc Dang <dhdang@apm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1438091186-10244-2-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-07-30 00:14:36 +02:00
..
autoprobe.c genirq: Handle pending irqs in irq_startup() 2012-02-15 11:56:59 +01:00
chip.c genirq: Use the proper parameter name in kernel doc 2015-07-30 00:14:36 +02:00
debug.h irq: hide debug macros so they don't collide with others. 2012-04-23 12:30:03 -04:00
devres.c genirq: devres: Fix testing return value of request_any_context_irq() 2015-05-13 10:47:37 +02:00
dummychip.c Merge branch 'linus' into irq/core 2015-06-05 22:25:01 +02:00
generic-chip.c genirq: Add chip_[suspend|resume] PM support to irq_chip 2015-07-27 08:09:38 +02:00
handle.c genirq: Remove the irq argument from note_interrupt() 2015-07-11 23:14:25 +02:00
internals.h Merge branch 'linus' into irq/core 2015-07-30 00:13:24 +02:00
irqdesc.c genirq: Remove the parameter 'irq' of kstat_incr_irqs_this_cpu() 2015-07-11 23:14:24 +02:00
irqdomain.c genirq/irqdomain: Allow irq domain aliasing 2015-07-30 00:14:36 +02:00
Kconfig genirq: Add generic msi irq domain support 2014-11-23 13:01:47 +01:00
Makefile genirq: Add generic msi irq domain support 2014-11-23 13:01:47 +01:00
manage.c genirq: Export irq_[get|set]_irqchip_state() 2015-07-27 08:09:38 +02:00
migration.c genirq: Remove bogus restriction in irq_move_mask_irq() 2015-06-20 19:05:14 +02:00
msi.c genirq/MSI: Move alloc_msi_entry() from PCI into generic MSI code 2015-07-22 18:37:44 +02:00
pm.c genirq: Remove irq argument from suspend/resume_irq() 2015-07-11 23:14:24 +02:00
proc.c genirq: Introduce helper function irq_data_get_node() 2015-06-12 16:54:21 +02:00
resend.c Merge branch 'linus' into irq/core 2015-07-30 00:13:24 +02:00
settings.h genirq: Prevent spurious detection for unconditionally polled interrupts 2013-11-13 16:03:02 +01:00
spurious.c genirq: Remove the irq argument from note_interrupt() 2015-07-11 23:14:25 +02:00