From 09001a8f97ac779573976b5838e3d293f1713c5c Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 18 Nov 2015 23:31:37 +0000 Subject: [PATCH] add new membarrier, userfaultfd and switch_endian syscalls new in linux v4.3 added for aarch64, arm, i386, mips, or1k, powerpc, x32 and x86_64. membarrier is a system wide memory barrier, moves most of the synchronization cost to one side, new in kernel commit 5b25b13ab08f616efd566347d809b4ece54570d1 userfaultfd is useful for qemu and is new in kernel commit 8d2afd96c20316d112e04d935d9e09150e988397 switch_endian is powerpc only for switching endianness, new in commit 529d235a0e190ded1d21ccc80a73e625ebcad09b --- arch/aarch64/bits/syscall.h | 4 ++++ arch/arm/bits/syscall.h | 4 ++++ arch/i386/bits/syscall.h | 4 ++++ arch/mips/bits/syscall.h | 4 ++++ arch/or1k/bits/syscall.h | 4 ++++ arch/powerpc/bits/syscall.h | 6 ++++++ arch/x32/bits/syscall.h | 4 ++++ arch/x86_64/bits/syscall.h | 4 ++++ 8 files changed, 34 insertions(+) diff --git a/arch/aarch64/bits/syscall.h b/arch/aarch64/bits/syscall.h index d7a1420a..d64b4371 100644 --- a/arch/aarch64/bits/syscall.h +++ b/arch/aarch64/bits/syscall.h @@ -265,6 +265,8 @@ #define __NR_memfd_create 279 #define __NR_bpf 280 #define __NR_execveat 281 +#define __NR_userfaultfd 282 +#define __NR_membarrier 283 #define SYS_io_setup __NR_io_setup #define SYS_io_destroy __NR_io_destroy @@ -533,3 +535,5 @@ #define SYS_memfd_create __NR_memfd_create #define SYS_bpf __NR_bpf #define SYS_execveat __NR_execveat +#define SYS_userfaultfd __NR_userfaultfd +#define SYS_membarrier __NR_membarrier diff --git a/arch/arm/bits/syscall.h b/arch/arm/bits/syscall.h index df6cda01..0ddb2ccf 100644 --- a/arch/arm/bits/syscall.h +++ b/arch/arm/bits/syscall.h @@ -341,6 +341,8 @@ #define __NR_memfd_create 385 #define __NR_bpf 386 #define __NR_execveat 387 +#define __NR_userfaultfd 388 +#define __NR_membarrier 389 #define __ARM_NR_breakpoint 0x0f0001 #define __ARM_NR_cacheflush 0x0f0002 @@ -693,3 +695,5 @@ #define SYS_memfd_create 385 #define SYS_bpf 386 #define SYS_execveat 387 +#define SYS_userfaultfd 388 +#define SYS_membarrier 389 diff --git a/arch/i386/bits/syscall.h b/arch/i386/bits/syscall.h index 64004d8e..27c5325c 100644 --- a/arch/i386/bits/syscall.h +++ b/arch/i386/bits/syscall.h @@ -372,6 +372,8 @@ #define __NR_recvfrom 371 #define __NR_recvmsg 372 #define __NR_shutdown 373 +#define __NR_userfaultfd 374 +#define __NR_membarrier 375 /* Repeated with SYS_ prefix */ @@ -750,3 +752,5 @@ #define SYS_recvfrom 371 #define SYS_recvmsg 372 #define SYS_shutdown 373 +#define SYS_userfaultfd 374 +#define SYS_membarrier 375 diff --git a/arch/mips/bits/syscall.h b/arch/mips/bits/syscall.h index 06761ed4..08bac39d 100644 --- a/arch/mips/bits/syscall.h +++ b/arch/mips/bits/syscall.h @@ -354,6 +354,8 @@ #define __NR_memfd_create 4354 #define __NR_bpf 4355 #define __NR_execveat 4356 +#define __NR_userfaultfd 4357 +#define __NR_membarrier 4358 /* Repeated with SYS_ prefix */ @@ -713,3 +715,5 @@ #define SYS_memfd_create 4354 #define SYS_bpf 4355 #define SYS_execveat 4356 +#define SYS_userfaultfd 4357 +#define SYS_membarrier 4358 diff --git a/arch/or1k/bits/syscall.h b/arch/or1k/bits/syscall.h index 967db728..203e243b 100644 --- a/arch/or1k/bits/syscall.h +++ b/arch/or1k/bits/syscall.h @@ -265,6 +265,8 @@ #define __NR_memfd_create 279 #define __NR_bpf 280 #define __NR_execveat 281 +#define __NR_userfaultfd 282 +#define __NR_membarrier 283 #define SYS_io_setup __NR_io_setup #define SYS_io_destroy __NR_io_destroy @@ -533,3 +535,5 @@ #define SYS_memfd_create __NR_memfd_create #define SYS_bpf __NR_bpf #define SYS_execveat __NR_execveat +#define SYS_userfaultfd __NR_userfaultfd +#define SYS_membarrier __NR_membarrier diff --git a/arch/powerpc/bits/syscall.h b/arch/powerpc/bits/syscall.h index 36fb6148..2dfec2fa 100644 --- a/arch/powerpc/bits/syscall.h +++ b/arch/powerpc/bits/syscall.h @@ -364,6 +364,9 @@ #define __NR_memfd_create 360 #define __NR_bpf 361 #define __NR_execveat 362 +#define __NR_switch_endian 363 +#define __NR_userfaultfd 364 +#define __NR_membarrier 365 /* * repeated with SYS prefix @@ -734,3 +737,6 @@ #define SYS_memfd_create 360 #define SYS_bpf 361 #define SYS_execveat 362 +#define SYS_switch_endian 363 +#define SYS_userfaultfd 364 +#define SYS_membarrier 365 diff --git a/arch/x32/bits/syscall.h b/arch/x32/bits/syscall.h index 5a6d4d10..6240c356 100644 --- a/arch/x32/bits/syscall.h +++ b/arch/x32/bits/syscall.h @@ -277,6 +277,8 @@ #define __NR_memfd_create (__X32_SYSCALL_BIT + 319) #define __NR_kexec_file_load (__X32_SYSCALL_BIT + 320) #define __NR_bpf (__X32_SYSCALL_BIT + 321) +#define __NR_userfaultfd (__X32_SYSCALL_BIT + 323) +#define __NR_membarrier (__X32_SYSCALL_BIT + 324) #define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512) #define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513) @@ -607,6 +609,8 @@ #define SYS_memfd_create __NR_memfd_create #define SYS_kexec_file_load __NR_kexec_file_load #define SYS_bpf __NR_bpf +#define SYS_userfaultfd __NR_userfaultfd +#define SYS_membarrier __NR_membarrier #define SYS_rt_sigaction __NR_rt_sigaction diff --git a/arch/x86_64/bits/syscall.h b/arch/x86_64/bits/syscall.h index 96ec51fa..0ff50268 100644 --- a/arch/x86_64/bits/syscall.h +++ b/arch/x86_64/bits/syscall.h @@ -321,6 +321,8 @@ #define __NR_kexec_file_load 320 #define __NR_bpf 321 #define __NR_execveat 322 +#define __NR_userfaultfd 323 +#define __NR_membarrier 324 @@ -649,3 +651,5 @@ #define SYS_kexec_file_load 320 #define SYS_bpf 321 #define SYS_execveat 322 +#define SYS_userfaultfd 323 +#define SYS_membarrier 324 -- 2.25.1