aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
-rw-r--r--arch/powerpc/kernel/irq.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 292163f5b39a..425616f92d18 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -114,7 +114,7 @@ static inline void set_soft_enabled(unsigned long enable)
114 : : "r" (enable), "i" (offsetof(struct paca_struct, soft_enabled))); 114 : : "r" (enable), "i" (offsetof(struct paca_struct, soft_enabled)));
115} 115}
116 116
117void local_irq_restore(unsigned long en) 117void raw_local_irq_restore(unsigned long en)
118{ 118{
119 /* 119 /*
120 * get_paca()->soft_enabled = en; 120 * get_paca()->soft_enabled = en;
@@ -174,6 +174,7 @@ void local_irq_restore(unsigned long en)
174 174
175 __hard_irq_enable(); 175 __hard_irq_enable();
176} 176}
177EXPORT_SYMBOL(raw_local_irq_restore);
177#endif /* CONFIG_PPC64 */ 178#endif /* CONFIG_PPC64 */
178 179
179int show_interrupts(struct seq_file *p, void *v) 180int show_interrupts(struct seq_file *p, void *v)
@@ -310,8 +311,21 @@ void do_IRQ(struct pt_regs *regs)
310 handler = &__do_IRQ; 311 handler = &__do_IRQ;
311 irqtp->task = curtp->task; 312 irqtp->task = curtp->task;
312 irqtp->flags = 0; 313 irqtp->flags = 0;
314
315 /* Copy the softirq bits in preempt_count so that the
316 * softirq checks work in the hardirq context.
317 */
318 irqtp->preempt_count =
319 (irqtp->preempt_count & ~SOFTIRQ_MASK) |
320 (curtp->preempt_count & SOFTIRQ_MASK);
321
313 call_handle_irq(irq, desc, irqtp, handler); 322 call_handle_irq(irq, desc, irqtp, handler);
314 irqtp->task = NULL; 323 irqtp->task = NULL;
324
325
326 /* Set any flag that may have been set on the
327 * alternate stack
328 */
315 if (irqtp->flags) 329 if (irqtp->flags)
316 set_bits(irqtp->flags, &curtp->flags); 330 set_bits(irqtp->flags, &curtp->flags);
317 } else 331 } else
@@ -357,7 +371,7 @@ void irq_ctx_init(void)
357 memset((void *)softirq_ctx[i], 0, THREAD_SIZE); 371 memset((void *)softirq_ctx[i], 0, THREAD_SIZE);
358 tp = softirq_ctx[i]; 372 tp = softirq_ctx[i];
359 tp->cpu = i; 373 tp->cpu = i;
360 tp->preempt_count = SOFTIRQ_OFFSET; 374 tp->preempt_count = 0;
361 375
362 memset((void *)hardirq_ctx[i], 0, THREAD_SIZE); 376 memset((void *)hardirq_ctx[i], 0, THREAD_SIZE);
363 tp = hardirq_ctx[i]; 377 tp = hardirq_ctx[i];