18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __ASM_H8300_SYSCALLS_32_H 38c2ecf20Sopenharmony_ci#define __ASM_H8300_SYSCALLS_32_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#ifdef __KERNEL__ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <linux/compiler.h> 88c2ecf20Sopenharmony_ci#include <linux/linkage.h> 98c2ecf20Sopenharmony_ci#include <linux/types.h> 108c2ecf20Sopenharmony_ci#include <linux/ptrace.h> 118c2ecf20Sopenharmony_ci#include <uapi/linux/audit.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cistatic inline int 148c2ecf20Sopenharmony_cisyscall_get_nr(struct task_struct *task, struct pt_regs *regs) 158c2ecf20Sopenharmony_ci{ 168c2ecf20Sopenharmony_ci return regs->orig_er0; 178c2ecf20Sopenharmony_ci} 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cistatic inline void 208c2ecf20Sopenharmony_cisyscall_get_arguments(struct task_struct *task, struct pt_regs *regs, 218c2ecf20Sopenharmony_ci unsigned long *args) 228c2ecf20Sopenharmony_ci{ 238c2ecf20Sopenharmony_ci *args++ = regs->er1; 248c2ecf20Sopenharmony_ci *args++ = regs->er2; 258c2ecf20Sopenharmony_ci *args++ = regs->er3; 268c2ecf20Sopenharmony_ci *args++ = regs->er4; 278c2ecf20Sopenharmony_ci *args++ = regs->er5; 288c2ecf20Sopenharmony_ci *args = regs->er6; 298c2ecf20Sopenharmony_ci} 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_cistatic inline int 328c2ecf20Sopenharmony_cisyscall_get_arch(struct task_struct *task) 338c2ecf20Sopenharmony_ci{ 348c2ecf20Sopenharmony_ci return AUDIT_ARCH_H8300; 358c2ecf20Sopenharmony_ci} 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/* Misc syscall related bits */ 398c2ecf20Sopenharmony_ciasmlinkage long do_syscall_trace_enter(struct pt_regs *regs); 408c2ecf20Sopenharmony_ciasmlinkage void do_syscall_trace_leave(struct pt_regs *regs); 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#endif /* __KERNEL__ */ 438c2ecf20Sopenharmony_ci#endif /* __ASM_H8300_SYSCALLS_32_H */ 44