diff options
-rw-r--r-- | arch/sparc/kernel/leon_kernel.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index 8591cf124ec..390e4696276 100644 --- a/arch/sparc/kernel/leon_kernel.c +++ b/arch/sparc/kernel/leon_kernel.c | |||
@@ -31,6 +31,7 @@ int leondebug_irq_disable; | |||
31 | int leon_debug_irqout; | 31 | int leon_debug_irqout; |
32 | static int dummy_master_l10_counter; | 32 | static int dummy_master_l10_counter; |
33 | unsigned long amba_system_id; | 33 | unsigned long amba_system_id; |
34 | static DEFINE_SPINLOCK(leon_irq_lock); | ||
34 | 35 | ||
35 | unsigned long leon3_gptimer_irq; /* interrupt controller irq number */ | 36 | unsigned long leon3_gptimer_irq; /* interrupt controller irq number */ |
36 | unsigned long leon3_gptimer_idx; /* Timer Index (0..6) within Timer Core */ | 37 | unsigned long leon3_gptimer_idx; /* Timer Index (0..6) within Timer Core */ |
@@ -88,10 +89,10 @@ static void leon_unmask_irq(struct irq_data *data) | |||
88 | unsigned long mask, flags; | 89 | unsigned long mask, flags; |
89 | 90 | ||
90 | mask = (unsigned long)data->chip_data; | 91 | mask = (unsigned long)data->chip_data; |
91 | local_irq_save(flags); | 92 | spin_lock_irqsave(&leon_irq_lock, flags); |
92 | LEON3_BYPASS_STORE_PA(LEON_IMASK, | 93 | LEON3_BYPASS_STORE_PA(LEON_IMASK, |
93 | (LEON3_BYPASS_LOAD_PA(LEON_IMASK) | (mask))); | 94 | (LEON3_BYPASS_LOAD_PA(LEON_IMASK) | (mask))); |
94 | local_irq_restore(flags); | 95 | spin_unlock_irqrestore(&leon_irq_lock, flags); |
95 | } | 96 | } |
96 | 97 | ||
97 | static void leon_mask_irq(struct irq_data *data) | 98 | static void leon_mask_irq(struct irq_data *data) |
@@ -99,11 +100,10 @@ static void leon_mask_irq(struct irq_data *data) | |||
99 | unsigned long mask, flags; | 100 | unsigned long mask, flags; |
100 | 101 | ||
101 | mask = (unsigned long)data->chip_data; | 102 | mask = (unsigned long)data->chip_data; |
102 | local_irq_save(flags); | 103 | spin_lock_irqsave(&leon_irq_lock, flags); |
103 | LEON3_BYPASS_STORE_PA(LEON_IMASK, | 104 | LEON3_BYPASS_STORE_PA(LEON_IMASK, |
104 | (LEON3_BYPASS_LOAD_PA(LEON_IMASK) & ~(mask))); | 105 | (LEON3_BYPASS_LOAD_PA(LEON_IMASK) & ~(mask))); |
105 | local_irq_restore(flags); | 106 | spin_unlock_irqrestore(&leon_irq_lock, flags); |
106 | |||
107 | } | 107 | } |
108 | 108 | ||
109 | static unsigned int leon_startup_irq(struct irq_data *data) | 109 | static unsigned int leon_startup_irq(struct irq_data *data) |
@@ -383,10 +383,10 @@ void leon_enable_irq_cpu(unsigned int irq_nr, unsigned int cpu) | |||
383 | { | 383 | { |
384 | unsigned long mask, flags, *addr; | 384 | unsigned long mask, flags, *addr; |
385 | mask = get_irqmask(irq_nr); | 385 | mask = get_irqmask(irq_nr); |
386 | local_irq_save(flags); | 386 | spin_lock_irqsave(&leon_irq_lock, flags); |
387 | addr = (unsigned long *)&(leon3_irqctrl_regs->mask[cpu]); | 387 | addr = (unsigned long *)&(leon3_irqctrl_regs->mask[cpu]); |
388 | LEON3_BYPASS_STORE_PA(addr, (LEON3_BYPASS_LOAD_PA(addr) | (mask))); | 388 | LEON3_BYPASS_STORE_PA(addr, (LEON3_BYPASS_LOAD_PA(addr) | (mask))); |
389 | local_irq_restore(flags); | 389 | spin_unlock_irqrestore(&leon_irq_lock, flags); |
390 | } | 390 | } |
391 | 391 | ||
392 | #endif | 392 | #endif |