From dd3ef10ea295f8f4181e6044fb19444cad7c6aab Mon Sep 17 00:00:00 2001 From: Guo Ren Date: Wed, 5 Sep 2018 14:25:14 +0800 Subject: csky: VDSO and rt_sigreturn This patch adds files related to VDSO and our VDSO only support rt_sigreturn. Signed-off-by: Guo Ren Reviewed-by: Arnd Bergmann --- arch/csky/abiv1/inc/abi/vdso.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 arch/csky/abiv1/inc/abi/vdso.h (limited to 'arch/csky/abiv1') diff --git a/arch/csky/abiv1/inc/abi/vdso.h b/arch/csky/abiv1/inc/abi/vdso.h new file mode 100644 index 000000000000..14352f524f1d --- /dev/null +++ b/arch/csky/abiv1/inc/abi/vdso.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#include + +static inline int setup_vdso_page(unsigned short *ptr) +{ + int err = 0; + + /* movi r1, 127 */ + err |= __put_user(0x67f1, ptr + 0); + /* addi r1, (139 - 127) */ + err |= __put_user(0x20b1, ptr + 1); + /* trap 0 */ + err |= __put_user(0x0008, ptr + 2); + + return err; +} -- cgit v1.2.3