Skip to content

Commit

Permalink
[PARISC] Make sure timer and IPI execute with interrupts disabled
Browse files Browse the repository at this point in the history
Fix a longstanding smp bug

The problem is that both the timer and ipi interrupts are being called
with interrupts enabled, which isn't what anyone is expecting.

The IPI issue has just started to show up by causing a BUG_ON in the
slab debugging code.  The timer issue never shows up because there's an
eiem work around in our irq.c

The fix is to label both these as SA_INTERRUPT which causes the generic
irq code not to enable interrupts.

I also suspect the smp_call_function timeouts we're seeing might be
connected with the fact that we disable IPIs when handling any other
type of interrupt.  I've put a WARN_ON in the code for executing
smp_call_function() with IPIs disabled.

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
  • Loading branch information
James Bottomley authored and Kyle McMartin committed Nov 17, 2005
1 parent 6b1de91 commit 9a8b458
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/parisc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,14 @@ void do_cpu_irq_mask(struct pt_regs *regs)
static struct irqaction timer_action = {
.handler = timer_interrupt,
.name = "timer",
.flags = SA_INTERRUPT,
};

#ifdef CONFIG_SMP
static struct irqaction ipi_action = {
.handler = ipi_interrupt,
.name = "IPI",
.flags = SA_INTERRUPT,
};
#endif

Expand Down
4 changes: 4 additions & 0 deletions arch/parisc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ smp_call_function (void (*func) (void *info), void *info, int retry, int wait)

/* Can deadlock when called with interrupts disabled */
WARN_ON(irqs_disabled());

/* can also deadlock if IPIs are disabled */
WARN_ON((get_eiem() & (1UL<<(CPU_IRQ_MAX - IPI_IRQ))) == 0);


data.func = func;
data.info = info;
Expand Down

0 comments on commit 9a8b458

Please sign in to comment.