diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-13 07:54:43 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-13 07:54:43 +0300 |
commit | 17d85bc7564571a1cce23ffdb2d2a33301876925 (patch) | |
tree | 815bfc3a02e94303c7c834770bf2a17012c10bf8 /arch/sparc | |
parent | d95c3578120e5bc4784069439f00ccb1b5f87717 (diff) | |
parent | 041b62374c7fedc11a8a1eeda2868612d3d1436c (diff) | |
download | linux-17d85bc7564571a1cce23ffdb2d2a33301876925.tar.xz |
Merge commit 'v2.6.29-rc8' into cpus4096
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/irq_64.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 3d2c6baae96b..233bd87a9637 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c @@ -324,17 +324,25 @@ static void sun4u_set_affinity(unsigned int virt_irq, sun4u_irq_enable(virt_irq); } +/* Don't do anything. The desc->status check for IRQ_DISABLED in + * handler_irq() will skip the handler call and that will leave the + * interrupt in the sent state. The next ->enable() call will hit the + * ICLR register to reset the state machine. + * + * This scheme is necessary, instead of clearing the Valid bit in the + * IMAP register, to handle the case of IMAP registers being shared by + * multiple INOs (and thus ICLR registers). Since we use a different + * virtual IRQ for each shared IMAP instance, the generic code thinks + * there is only one user so it prematurely calls ->disable() on + * free_irq(). + * + * We have to provide an explicit ->disable() method instead of using + * NULL to get the default. The reason is that if the generic code + * sees that, it also hooks up a default ->shutdown method which + * invokes ->mask() which we do not want. See irq_chip_set_defaults(). + */ static void sun4u_irq_disable(unsigned int virt_irq) { - struct irq_handler_data *data = get_irq_chip_data(virt_irq); - - if (likely(data)) { - unsigned long imap = data->imap; - unsigned long tmp = upa_readq(imap); - - tmp &= ~IMAP_VALID; - upa_writeq(tmp, imap); - } } static void sun4u_irq_eoi(unsigned int virt_irq) @@ -747,7 +755,8 @@ void handler_irq(int irq, struct pt_regs *regs) desc = irq_desc + virt_irq; - desc->handle_irq(virt_irq, desc); + if (!(desc->status & IRQ_DISABLED)) + desc->handle_irq(virt_irq, desc); bucket_pa = next_pa; } |