Commit 8df74b07 authored by Don Mahurin's avatar Don Mahurin Committed by Philippe Gerum
Browse files

arm64/ipipe: syscall updates. enable __ipipe_syscall_root. add call from entry.S

remove conditional aeabi/oabi code which does not apply to armv8/arm64
parent 4cf710e8
......@@ -695,6 +695,19 @@ el0_svc:
el0_svc_naked: // compat entry point
stp x0, scno, [sp, #S_ORIG_X0] // save the original x0 and syscall number
mov x1, sp
mov x0, scno
bl __ipipe_syscall_root
cmp x0, #0
blt __ipipe_ret_to_user
get_thread_info tsk
bgt ret_to_user
ldp x0, x1, [sp]
ldp x2, x3, [sp, #S_X2]
#endif /* CONFIG_IPIPE */
ct_user_exit 1
ldr x16, [tsk, #TI_FLAGS] // check for syscall hooks
......@@ -355,18 +355,15 @@ __ipipe_switch_to_notifier_call_chain(struct atomic_notifier_head *nh,
(void)(flags); \
#define __NR_SYSCALL_BASE 0
asmlinkage int __ipipe_syscall_root(unsigned long scno, struct pt_regs *regs)
const bool oabi = scno + __NR_SYSCALL_BASE != regs->ARM_r7;
#elif defined(CONFIG_AEABI)
const bool oabi = false;
#else /* OABI */
const bool oabi = true;
struct task_struct *const task = current;
struct ipipe_percpu_domain_data *p;
unsigned long orig_r7;
unsigned long orig_x8;
unsigned long flags;
int ret = 0;
......@@ -387,18 +384,15 @@ asmlinkage int __ipipe_syscall_root(unsigned long scno, struct pt_regs *regs)
if (!__ipipe_syscall_watched_p(task, scno))
goto out;
if (oabi) {
* We use r7 to pass the syscall number to the other domains.
orig_r7 = regs->ARM_r7;
regs->ARM_r7 = scno;
* We use x8 to pass the syscall number to the other domains.
orig_x8 = regs->regs[8];
regs->regs[8] = scno;
ret = __ipipe_notify_syscall(regs);
if (oabi)
regs->ARM_r7 = orig_r7;
regs->regs[8] = orig_x8;
flags = fast_irq_disable();
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