Commit c6e43899 authored by Philippe Gerum's avatar Philippe Gerum

ipipe: do not attempt to preempt_schedule over the IRQ syncer

Rescheduling over the IRQ log syncer is a source of infinite
recursion, via preempt_schedule().

Besides, rescheduling eagerly (if CONFIG_PREEMPT) after a virtual IRQ
has been dispatched directly from the syncer is useless. If such virq
was dispatched over a real IRQ context, the kernel exit code (entry.S)
should notice the opportunity for preemption and reschedule. Likewise,
if the virq was posted from a kernel context
(e.g. ipipe_post_irq_root()), a rescheduling point will certainly be
traversed before the kernel is exited or goes idle.
parent 08cc334c
......@@ -165,15 +165,6 @@ static inline void __ipipe_sync_stage(void)
__ipipe_do_sync_stage();
}
#ifndef __ipipe_check_root_resched
#ifdef CONFIG_PREEMPT
#define __ipipe_check_root_resched() \
(preempt_count() == 0 && need_resched())
#else
#define __ipipe_check_root_resched() 0
#endif
#endif
#ifndef __ipipe_run_irqtail
#define __ipipe_run_irqtail(irq) do { } while(0)
#endif
......
......@@ -1483,8 +1483,6 @@ respin:
irq_exit();
root_stall_after_handler();
hard_local_irq_disable();
while (__ipipe_check_root_resched())
__ipipe_preempt_schedule_irq();
} else {
ipd->irqs[irq].handler(irq, ipd->irqs[irq].cookie);
root_stall_after_handler();
......@@ -1893,7 +1891,7 @@ void __ipipe_uaccess_might_fault(void)
struct ipipe_percpu_domain_data *pdd;
struct ipipe_domain *ipd;
unsigned long flags;
flags = hard_local_irq_save();
ipd = __ipipe_current_domain;
if (ipd == ipipe_root_domain) {
......@@ -1910,7 +1908,6 @@ void __ipipe_uaccess_might_fault(void)
(void)pdd;
#endif /* !CONFIG_IPIPE_DEBUG_CONTEXT */
hard_local_irq_restore(flags);
}
EXPORT_SYMBOL_GPL(__ipipe_uaccess_might_fault);
#endif
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