diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2011-06-08 22:54:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-09 19:12:34 -0400 |
commit | 10f0d07c51516bd24b040016c6d4304eef05f115 (patch) | |
tree | 1351db454e31234e7a5a247a3323a2e6642b5217 | |
parent | a7d82a0a3cd547494294baee7f9764ea44bead73 (diff) |
sparc32, leon: bugfix in LEON SMP interrupt init
During converting per-cpu ticker to genirq layer some
IRQ initialization code was removed by commit
2cf9530420e446bb61f665d02afeb81070106900 ("sparc32,leon:
per-cpu ticker use genirq per-cpu handler").
This patch reintroduces the code at the same place it was
removed from. IRQ12 - IRQ14 will crash on LEON SMP without
this patch because it will run the SUN4M IRQ trap handler.
Reported-by: Jan Andersson <jan@gaisler.com>
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/kernel/leon_kernel.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index c23d61e9e52c..d17255a2bbac 100644 --- a/arch/sparc/kernel/leon_kernel.c +++ b/arch/sparc/kernel/leon_kernel.c | |||
@@ -376,6 +376,22 @@ void __init leon_init_timers(irq_handler_t counter_fn) | |||
376 | prom_halt(); | 376 | prom_halt(); |
377 | } | 377 | } |
378 | 378 | ||
379 | #ifdef CONFIG_SMP | ||
380 | { | ||
381 | unsigned long flags; | ||
382 | |||
383 | /* | ||
384 | * In SMP, sun4m adds a IPI handler to IRQ trap handler that | ||
385 | * LEON never must take, sun4d and LEON overwrites the branch | ||
386 | * with a NOP. | ||
387 | */ | ||
388 | local_irq_save(flags); | ||
389 | patchme_maybe_smp_msg[0] = 0x01000000; /* NOP out the branch */ | ||
390 | local_flush_cache_all(); | ||
391 | local_irq_restore(flags); | ||
392 | } | ||
393 | #endif | ||
394 | |||
379 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[leon3_gptimer_idx].ctrl, | 395 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[leon3_gptimer_idx].ctrl, |
380 | LEON3_GPTIMER_EN | | 396 | LEON3_GPTIMER_EN | |
381 | LEON3_GPTIMER_RL | | 397 | LEON3_GPTIMER_RL | |