From 52964f87c64e6c6ea671b5bf3030fb1494090a48 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Tue, 28 Aug 2007 18:47:54 +1000 Subject: [POWERPC] Add an optional device_node pointer to the irq_host The majority of irq_host implementations (3 out of 4) are associated with a device_node, and need to stash it somewhere. Rather than having it somewhere different for each host, add an optional device_node pointer to the irq_host structure. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/ps3/interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/platforms/ps3/interrupt.c') diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c index 67e32ec9b37..30b9f4c6eb5 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c @@ -726,7 +726,7 @@ void __init ps3_init_IRQ(void) unsigned cpu; struct irq_host *host; - host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops, + host = irq_alloc_host(NULL, IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops, PS3_INVALID_OUTLET); irq_set_default_host(host); irq_set_virq_count(PS3_PLUG_MAX + 1); -- cgit v1.2.3 From 8528ab84ebe7a1eeed9b0acc808df86663d506c0 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Tue, 28 Aug 2007 18:47:55 +1000 Subject: [POWERPC] Invert null match behaviour for irq_hosts Currently if you don't specify a match callback for your irq_host it's assumed you match everything. This is a kind of opt-out approach, and turns out to be the exception rather than the rule. So change the semantics to be opt-in, ie. you don't match anything unless you provide a match callback. This in itself isn't very useful, but will allow us to provide a default match implementation in a subsequent patch. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/ps3/interrupt.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/powerpc/platforms/ps3/interrupt.c') diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c index 30b9f4c6eb5..3a6db04aa94 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c @@ -673,9 +673,16 @@ static int ps3_host_map(struct irq_host *h, unsigned int virq, return 0; } +static int ps3_host_match(struct irq_host *h, struct device_node *np) +{ + /* Match all */ + return 1; +} + static struct irq_host_ops ps3_host_ops = { .map = ps3_host_map, .unmap = ps3_host_unmap, + .match = ps3_host_match, }; void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq) -- cgit v1.2.3