summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/xics/xics-common.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2011-04-14 22:31:59 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-20 17:01:20 +1000
commit5ca123760177ed16cbd9bab609bff69eb8fc45bd (patch)
tree45a054edd05fc06924e4a62e559ebee79f08efcd /arch/powerpc/sysdev/xics/xics-common.c
parentab814b938d1d372bd2ac6268c15d4e0e6a5245c4 (diff)
downloadop-kernel-dev-5ca123760177ed16cbd9bab609bff69eb8fc45bd.zip
op-kernel-dev-5ca123760177ed16cbd9bab609bff69eb8fc45bd.tar.gz
powerpc/xics: Move irq_host matching into the ics backend
An upcoming new ics backend will need to implement different matching semantics to the current ones, which are essentially the RTAS ics backends. So move the current match into the RTAS backend, and allow other ics backends to override. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/xics/xics-common.c')
-rw-r--r--arch/powerpc/sysdev/xics/xics-common.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c
index e70175d..c58844d 100644
--- a/arch/powerpc/sysdev/xics/xics-common.c
+++ b/arch/powerpc/sysdev/xics/xics-common.c
@@ -331,11 +331,13 @@ int xics_get_irq_server(unsigned int virq, const struct cpumask *cpumask,
static int xics_host_match(struct irq_host *h, struct device_node *node)
{
- /* IBM machines have interrupt parents of various funky types for things
- * like vdevices, events, etc... The trick we use here is to match
- * everything here except the legacy 8259 which is compatible "chrp,iic"
- */
- return !of_device_is_compatible(node, "chrp,iic");
+ struct ics *ics;
+
+ list_for_each_entry(ics, &ics_list, link)
+ if (ics->host_match(ics, node))
+ return 1;
+
+ return 0;
}
/* Dummies */
OpenPOWER on IntegriCloud