Commit 39bf5be1 authored by Jan Kiszka's avatar Jan Kiszka

arm/ipipe: Add support for userspace return notifier

This adds the arm-specific bits to implement the userspace return
notifier.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 0decb4dd
......@@ -185,10 +185,12 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
#define TIP_MAYDAY 0 /* MAYDAY call is pending */
#define TIP_NOTIFY 1 /* Notify head domain about kernel events */
#define TIP_HEAD 2 /* Runs in head domain */
#define TIP_USERINTRET 3 /* Notify on IRQ/trap return to root userspace */
#define _TIP_MAYDAY (1 << TIP_MAYDAY)
#define _TIP_NOTIFY (1 << TIP_NOTIFY)
#define _TIP_HEAD (1 << TIP_HEAD)
#define _TIP_USERINTRET (1 << TIP_USERINTRET)
#endif /* __KERNEL__ */
#endif /* __ASM_ARM_THREAD_INFO_H */
......@@ -134,8 +134,25 @@ ENTRY(ret_to_user_from_irq)
tst r1, #_TIF_WORK_MASK
bne slow_work_pending
no_work_pending:
#ifdef CONFIG_IPIPE
get_thread_info tsk
ldr r1, [tsk, #TI_IPIPE]
tst r1, #_TIP_USERINTRET
bne call_user_intret_notifier
goto_user:
#endif
asm_trace_hardirqs_on save = 0
slow_restore_user_regs
#ifdef CONFIG_IPIPE
call_user_intret_notifier:
enable_irq_notrace
bl __ipipe_notify_user_intreturn
cmp r0, #0
beq ret_slow_syscall
disable_irq_notrace
b goto_user
#endif
ENDPROC(ret_to_user_from_irq)
ENDPROC(ret_to_user)
......
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