mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 22:15:10 +07:00
dd3ef10ea2
This patch adds files related to VDSO and our VDSO only support rt_sigreturn. Signed-off-by: Guo Ren <ren_guo@c-sky.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
18 lines
329 B
C
18 lines
329 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#include <linux/uaccess.h>
|
|
|
|
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;
|
|
}
|