Commit 4fc0481b authored by Philippe Gerum's avatar Philippe Gerum
Browse files

arm: ipipe: preserve the hard interrupt state across mayday trap

The mayday trap asks the co-kernel to deal with a runaway context
which has been detected earlier. When doing so, the co-kernel might
re-enable hard interrupts, which we have to disable again before
unwinding the IRQ context which triggered the whole process (like a
watchdog event).

Use __ipipe_call_mayday() to fire the notification to the co-kernel
instead of the open coded version, so that we do restore the hard
interrupt state properly before leaving __ipipe_exit_irq().
parent 1315bcb3
......@@ -270,21 +270,8 @@ __ipipe_switch_to_notifier_call_chain(struct atomic_notifier_head *nh,
void __ipipe_exit_irq(struct pt_regs *regs)
* Testing for user_regs() eliminates foreign stack contexts,
* including from legacy domains which did not set the foreign
* stack bit (foreign stacks are always kernel-based).
if (user_mode(regs) &&
ipipe_test_thread_flag(TIP_MAYDAY)) {
* MAYDAY is never raised under normal circumstances,
* so prefer test then maybe clear over
* test_and_clear.
__ipipe_notify_trap(IPIPE_TRAP_MAYDAY, regs);
if (user_mode(regs) && ipipe_test_thread_flag(TIP_MAYDAY))
void printascii(const char *s);
Supports Markdown
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