Skip to content

Commit 970def6

Browse files
daniel-hellstromdavem330
authored andcommitted
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>
1 parent 01dae0f commit 970def6

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎arch/sparc/kernel/leon_kernel.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ void __init leon_init_timers(irq_handler_t counter_fn)
345345
icsel = (icsel >> ((7 - (boot_cpu_id&0x7)) * 4)) & 0xf;
346346
leon3_irqctrl_regs += icsel;
347347

348+
/* Mask all IRQs on boot-cpu IRQ controller */
349+
LEON3_BYPASS_STORE_PA(&leon3_irqctrl_regs->mask[boot_cpu_id], 0);
350+
348351
/* Probe extended IRQ controller */
349352
eirq = (LEON3_BYPASS_LOAD_PA(&leon3_irqctrl_regs->mpstatus)
350353
>> 16) & 0xf;

‎arch/sparc/kernel/leon_smp.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ int __cpuinit leon_boot_one_cpu(int i)
217217
(unsigned int)&leon3_irqctrl_regs->mpstatus);
218218
local_flush_cache_all();
219219

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 */
220224
LEON_BYPASS_STORE_PA(&(leon3_irqctrl_regs->mpstatus), 1 << i);
221225

222226
/* wheee... it's going... */

0 commit comments

Comments
 (0)