aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2011-04-21 00:20:25 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-21 19:44:45 -0400
commit970def654e9df1ad28ddb466bb1d123a55e1e7e7 (patch)
tree03a4ba50b79cbe40c6f37219026fe9cecb596f40 /arch/sparc/kernel
parent01dae0f08dddf6ba86f956e60dceee4968f7a555 (diff)
sparc32,leon: don't rely on bootloader to mask IRQs
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/leon_kernel.c3
-rw-r--r--arch/sparc/kernel/leon_smp.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c
index 8417a914e8a3..2f538ac2e139 100644
--- a/arch/sparc/kernel/leon_kernel.c
+++ b/arch/sparc/kernel/leon_kernel.c
@@ -345,6 +345,9 @@ void __init leon_init_timers(irq_handler_t counter_fn)
345 icsel = (icsel >> ((7 - (boot_cpu_id&0x7)) * 4)) & 0xf; 345 icsel = (icsel >> ((7 - (boot_cpu_id&0x7)) * 4)) & 0xf;
346 leon3_irqctrl_regs += icsel; 346 leon3_irqctrl_regs += icsel;
347 347
348 /* Mask all IRQs on boot-cpu IRQ controller */
349 LEON3_BYPASS_STORE_PA(&leon3_irqctrl_regs->mask[boot_cpu_id], 0);
350
348 /* Probe extended IRQ controller */ 351 /* Probe extended IRQ controller */
349 eirq = (LEON3_BYPASS_LOAD_PA(&leon3_irqctrl_regs->mpstatus) 352 eirq = (LEON3_BYPASS_LOAD_PA(&leon3_irqctrl_regs->mpstatus)
350 >> 16) & 0xf; 353 >> 16) & 0xf;
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c
index cbd8e31d01ff..de9506d9ad7d 100644
--- a/arch/sparc/kernel/leon_smp.c
+++ b/arch/sparc/kernel/leon_smp.c
@@ -217,6 +217,10 @@ int __cpuinit leon_boot_one_cpu(int i)
217 (unsigned int)&leon3_irqctrl_regs->mpstatus); 217 (unsigned int)&leon3_irqctrl_regs->mpstatus);
218 local_flush_cache_all(); 218 local_flush_cache_all();
219 219
220 /* Make sure all IRQs are of from the start for this new CPU */
221 LEON_BYPASS_STORE_PA(&leon3_irqctrl_regs->mask[i], 0);
222
223 /* Wake one CPU */
220 LEON_BYPASS_STORE_PA(&(leon3_irqctrl_regs->mpstatus), 1 << i); 224 LEON_BYPASS_STORE_PA(&(leon3_irqctrl_regs->mpstatus), 1 << i);
221 225
222 /* wheee... it's going... */ 226 /* wheee... it's going... */