diff options
author | Scott Wood <scottwood@freescale.com> | 2006-10-23 12:35:22 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-24 23:49:22 -0400 |
commit | f49196a5f53aa62a964b08ffa2c59699a0c8eb53 (patch) | |
tree | 3400c448ec36f07681d6ab9541e175e2818c772c /arch/powerpc/sysdev/ipic.c | |
parent | f84c39da766b4c8f13872282f58286a57ad05b3e (diff) |
[POWERPC] IPIC: Fix spinlock recursion in set_irq_handler
This causes ipic_set_irq_type to set the handler directly rather
than call set_irq_handler, which causes spinlock recursion because
the lock is already held when ipic_set_irq_type is called.
I'm also not convinced that ipic_set_irq_type should be changing the
handler at all. There seem to be several controllers that don't and
several that do. Those that do would break what appears to be a common
usage of calling set_irq_chip_and_handler followed by set_irq_type, if a
non-standard handler were to be used. OTOH, irq_create_of_mapping()
doesn't set the handler, but only calls set_irq_type().
This patch gets things working in the spinlock-debugging-enabled case,
but I'm curious as to where the handler setting is ideally supposed to be
done. I don't see any documentation on set_irq_type() that clarifies
what the semantics are supposed to be.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/ipic.c')
-rw-r--r-- | arch/powerpc/sysdev/ipic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index bc4d4a7f9657..746f78c15375 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
@@ -473,9 +473,9 @@ static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type) | |||
473 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; | 473 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; |
474 | if (flow_type & IRQ_TYPE_LEVEL_LOW) { | 474 | if (flow_type & IRQ_TYPE_LEVEL_LOW) { |
475 | desc->status |= IRQ_LEVEL; | 475 | desc->status |= IRQ_LEVEL; |
476 | set_irq_handler(virq, handle_level_irq); | 476 | desc->handle_irq = handle_level_irq; |
477 | } else { | 477 | } else { |
478 | set_irq_handler(virq, handle_edge_irq); | 478 | desc->handle_irq = handle_edge_irq; |
479 | } | 479 | } |
480 | 480 | ||
481 | /* only EXT IRQ senses are programmable on ipic | 481 | /* only EXT IRQ senses are programmable on ipic |