Commit a6e72f23 authored by Philippe Gerum's avatar Philippe Gerum

ipipe: handle root virqs specifically in fast dispatcher

parent 781f1796
......@@ -1324,13 +1324,17 @@ log:
__ipipe_sync_pipeline(ipipe_head_domain);
}
#ifdef CONFIG_TRACE_IRQFLAGS
#define root_stall_after_handler() local_irq_disable()
#else
#define root_stall_after_handler() do { } while (0)
#endif
void __ipipe_dispatch_irq_fast(unsigned int irq) /* hw interrupts off */
{
struct ipipe_percpu_domain_data *p = ipipe_this_cpu_leading_context(), *old;
struct ipipe_domain *head = p->domain;
IPIPE_WARN_ONCE(head == ipipe_root_domain && ipipe_virtual_irq_p(irq));
if (unlikely(test_bit(IPIPE_STALL_FLAG, &p->status))) {
__ipipe_set_irq_pending(head, irq);
return;
......@@ -1343,10 +1347,22 @@ void __ipipe_dispatch_irq_fast(unsigned int irq) /* hw interrupts off */
p->irqall[irq]++;
__set_bit(IPIPE_STALL_FLAG, &p->status);
barrier();
head->irqs[irq].handler(irq, head->irqs[irq].cookie);
if (likely(head != ipipe_root_domain)) {
head->irqs[irq].handler(irq, head->irqs[irq].cookie);
__ipipe_run_irqtail(irq);
} else {
if (ipipe_virtual_irq_p(irq)) {
irq_enter();
head->irqs[irq].handler(irq, head->irqs[irq].cookie);
irq_exit();
} else
head->irqs[irq].handler(irq, head->irqs[irq].cookie);
root_stall_after_handler();
}
hard_local_irq_disable();
__ipipe_run_irqtail(irq);
barrier();
__clear_bit(IPIPE_STALL_FLAG, &p->status);
if (__ipipe_current_context == p) {
......@@ -1365,12 +1381,6 @@ void __ipipe_dispatch_irq_fast(unsigned int irq) /* hw interrupts off */
__ipipe_do_sync_pipeline(head);
}
#ifdef CONFIG_TRACE_IRQFLAGS
#define root_stall_after_handler() local_irq_disable()
#else
#define root_stall_after_handler() do { } while (0)
#endif
#ifdef CONFIG_PREEMPT
asmlinkage void preempt_schedule_irq(void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment