3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-02-08 07:13:06 +00:00

18 lines
329 B
C
Raw Normal View History

2021-05-27 00:09:36 +05:00
/* SPDX-License-Identifier: GPL-2.0 */
2021-09-23 21:59:15 +05:00
#include <linux/uaccess.h>
2021-05-27 00:09:36 +05:00
2021-09-23 21:59:15 +05:00
static inline int setup_vdso_page(unsigned short *ptr)
{
int err = 0;
2021-05-27 00:09:36 +05:00
2021-09-23 21:59:15 +05:00
/* 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;
}