diff options
Diffstat (limited to 'arch/parisc/kernel/irq.c')
-rw-r--r-- | arch/parisc/kernel/irq.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index c5c9125dacec..76ce5e3b0050 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c | |||
@@ -46,14 +46,10 @@ extern irqreturn_t ipi_interrupt(int, void *); | |||
46 | static volatile unsigned long cpu_eiem = 0; | 46 | static volatile unsigned long cpu_eiem = 0; |
47 | 47 | ||
48 | /* | 48 | /* |
49 | ** ack bitmap ... habitually set to 1, but reset to zero | 49 | ** local ACK bitmap ... habitually set to 1, but reset to zero |
50 | ** between ->ack() and ->end() of the interrupt to prevent | 50 | ** between ->ack() and ->end() of the interrupt to prevent |
51 | ** re-interruption of a processing interrupt. | 51 | ** re-interruption of a processing interrupt. |
52 | */ | 52 | */ |
53 | static volatile unsigned long global_ack_eiem = ~0UL; | ||
54 | /* | ||
55 | ** Local bitmap, same as above but for per-cpu interrupts | ||
56 | */ | ||
57 | static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; | 53 | static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; |
58 | 54 | ||
59 | static void cpu_disable_irq(unsigned int irq) | 55 | static void cpu_disable_irq(unsigned int irq) |
@@ -94,13 +90,11 @@ void cpu_ack_irq(unsigned int irq) | |||
94 | int cpu = smp_processor_id(); | 90 | int cpu = smp_processor_id(); |
95 | 91 | ||
96 | /* Clear in EIEM so we can no longer process */ | 92 | /* Clear in EIEM so we can no longer process */ |
97 | if (CHECK_IRQ_PER_CPU(irq_desc[irq].status)) | 93 | per_cpu(local_ack_eiem, cpu) &= ~mask; |
98 | per_cpu(local_ack_eiem, cpu) &= ~mask; | ||
99 | else | ||
100 | global_ack_eiem &= ~mask; | ||
101 | 94 | ||
102 | /* disable the interrupt */ | 95 | /* disable the interrupt */ |
103 | set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); | 96 | set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu)); |
97 | |||
104 | /* and now ack it */ | 98 | /* and now ack it */ |
105 | mtctl(mask, 23); | 99 | mtctl(mask, 23); |
106 | } | 100 | } |
@@ -111,13 +105,10 @@ void cpu_end_irq(unsigned int irq) | |||
111 | int cpu = smp_processor_id(); | 105 | int cpu = smp_processor_id(); |
112 | 106 | ||
113 | /* set it in the eiems---it's no longer in process */ | 107 | /* set it in the eiems---it's no longer in process */ |
114 | if (CHECK_IRQ_PER_CPU(irq_desc[irq].status)) | 108 | per_cpu(local_ack_eiem, cpu) |= mask; |
115 | per_cpu(local_ack_eiem, cpu) |= mask; | ||
116 | else | ||
117 | global_ack_eiem |= mask; | ||
118 | 109 | ||
119 | /* enable the interrupt */ | 110 | /* enable the interrupt */ |
120 | set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); | 111 | set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu)); |
121 | } | 112 | } |
122 | 113 | ||
123 | #ifdef CONFIG_SMP | 114 | #ifdef CONFIG_SMP |
@@ -354,8 +345,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) | |||
354 | local_irq_disable(); | 345 | local_irq_disable(); |
355 | irq_enter(); | 346 | irq_enter(); |
356 | 347 | ||
357 | eirr_val = mfctl(23) & cpu_eiem & global_ack_eiem & | 348 | eirr_val = mfctl(23) & cpu_eiem & per_cpu(local_ack_eiem, cpu); |
358 | per_cpu(local_ack_eiem, cpu); | ||
359 | if (!eirr_val) | 349 | if (!eirr_val) |
360 | goto set_out; | 350 | goto set_out; |
361 | irq = eirr_to_irq(eirr_val); | 351 | irq = eirr_to_irq(eirr_val); |
@@ -381,7 +371,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) | |||
381 | return; | 371 | return; |
382 | 372 | ||
383 | set_out: | 373 | set_out: |
384 | set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); | 374 | set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu)); |
385 | goto out; | 375 | goto out; |
386 | } | 376 | } |
387 | 377 | ||