Commit dec5e42f authored by Philippe Gerum's avatar Philippe Gerum Committed by Dmitriy Cherkasov
Browse files

arm64: 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 41742503
......@@ -165,21 +165,8 @@ void __ipipe_enable_pipeline(void)
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))
/* hw irqs off */
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