Commit 3c63e690 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

arm64/ipipe: use fast domain check in exception path

parent 32ca7def
......@@ -34,6 +34,9 @@ int main(void)
DEFINE(TSK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
BLANK();
DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
#ifdef CONFIG_IPIPE
DEFINE(TI_IPIPE, offsetof(struct thread_info, ipipe_flags));
#endif
DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
DEFINE(TI_ADDR_LIMIT, offsetof(struct thread_info, addr_limit));
DEFINE(TI_TASK, offsetof(struct thread_info, task));
......
......@@ -607,17 +607,6 @@ el0_irq_naked:
b ret_to_user
ENDPROC(el0_irq)
#ifdef CONFIG_IPIPE
ret_from_exception:
disable_irq
bl __ipipe_check_root
cmp x0, #1
bne __ipipe_ret_to_user_irqs_disabled //Fast exit path over non-root domains
ct_user_exit
b ret_to_user
ENDPROC(ret_from_exception)
#endif
/*
* Register switch for AArch64. The callee-saved registers need to be saved
* and restored. On entry:
......@@ -661,14 +650,16 @@ ret_fast_syscall:
kernel_exit 0, ret = 1
#ifdef CONFIG_IPIPE
ret_from_exception:
ldr x0, [tsk, #TI_IPIPE]
tst x0, #_TIP_HEAD
b.eq ret_to_user
__ipipe_ret_to_user:
disable_irq // disable interrupts
ENTRY(__ipipe_ret_to_user_irqs_disabled)
disable_irq
__ipipe_ret_to_user_irqs_disabled:
kernel_exit 0, ret = 0
ENDPROC(__ipipe_ret_to_user_irqs_disabled)
#endif /* CONFIG_IPIPE */
/*
* Ok, we need to do extra processing, enter the slow path.
*/
......
......@@ -305,11 +305,6 @@ unsigned asmlinkage __ipipe_bugon_irqs_enabled(unsigned x)
}
#endif
asmlinkage int __ipipe_check_root(void)
{
return __ipipe_root_p;
}
asmlinkage int __ipipe_check_root_interruptible(void)
{
return __ipipe_root_p && !irqs_disabled();
......
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