All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/9] allocate sys_membarrier system call number on major archs
@ 2015-08-27 17:56 Mathieu Desnoyers
  2015-08-27 17:56 ` [RFC PATCH 1/9] powerpc: allocate sys_membarrier system call number Mathieu Desnoyers
                   ` (8 more replies)
  0 siblings, 9 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api; +Cc: linux-kernel, Mathieu Desnoyers

Wire up the sys_membarrier system call on all major architectures.
This would need testing from architecture maintainers and/or
enthusiasts. Posting as RFC for now. Could be picked into Andrew's
tree once we get the Tested-by tags.

Thanks,

Mathieu

Mathieu Desnoyers (9):
  powerpc: allocate sys_membarrier system call number
  arm: allocate sys_membarrier system call number
  arm64: allocate sys_membarrier system call number
  mips: allocate sys_membarrier system call number
  s390/s390x: allocate sys_membarrier system call number
  sparc/sparc64: allocate sys_membarrier system call number
  alpha: allocate sys_membarrier system call number
  ia64: allocate sys_membarrier system call number
  parisc: allocate sys_membarrier system call number

 arch/alpha/include/uapi/asm/unistd.h   |  1 +
 arch/alpha/kernel/systbls.S            |  1 +
 arch/arm/include/asm/unistd.h          |  2 +-
 arch/arm/include/uapi/asm/unistd.h     |  1 +
 arch/arm/kernel/calls.S                |  1 +
 arch/arm64/include/asm/unistd32.h      |  2 ++
 arch/ia64/include/asm/unistd.h         |  2 +-
 arch/ia64/include/uapi/asm/unistd.h    |  1 +
 arch/ia64/kernel/entry.S               |  1 +
 arch/mips/include/uapi/asm/unistd.h    | 15 +++++++++------
 arch/mips/kernel/scall32-o32.S         |  1 +
 arch/mips/kernel/scall64-64.S          |  1 +
 arch/mips/kernel/scall64-n32.S         |  1 +
 arch/mips/kernel/scall64-o32.S         |  1 +
 arch/parisc/include/uapi/asm/unistd.h  |  3 ++-
 arch/parisc/kernel/syscall_table.S     |  1 +
 arch/powerpc/include/asm/systbl.h      |  1 +
 arch/powerpc/include/asm/unistd.h      |  2 +-
 arch/powerpc/include/uapi/asm/unistd.h |  1 +
 arch/s390/include/uapi/asm/unistd.h    |  3 ++-
 arch/s390/kernel/syscalls.S            |  1 +
 arch/sparc/include/uapi/asm/unistd.h   |  3 ++-
 arch/sparc/kernel/systbls_32.S         |  2 +-
 arch/sparc/kernel/systbls_64.S         |  4 ++--
 24 files changed, 37 insertions(+), 15 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 40+ messages in thread

* [RFC PATCH 1/9] powerpc: allocate sys_membarrier system call number
  2015-08-27 17:56 [RFC PATCH 0/9] allocate sys_membarrier system call number on major archs Mathieu Desnoyers
@ 2015-08-27 17:56 ` Mathieu Desnoyers
  2015-08-31  6:54     ` Michael Ellerman
  2015-08-27 17:56   ` Mathieu Desnoyers
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api
  Cc: linux-kernel, Mathieu Desnoyers, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, linuxppc-dev

Allow it to be used from SPU, since it should not have unwanted
side-effects.

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Paul Mackerras <paulus@samba.org>
CC: Michael Ellerman <mpe@ellerman.id.au>
CC: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/include/asm/systbl.h      | 1 +
 arch/powerpc/include/asm/unistd.h      | 2 +-
 arch/powerpc/include/uapi/asm/unistd.h | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index 4d65499..126d0c4 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -369,3 +369,4 @@ SYSCALL_SPU(bpf)
 COMPAT_SYS(execveat)
 PPC64ONLY(switch_endian)
 SYSCALL_SPU(userfaultfd)
+SYSCALL_SPU(membarrier)
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index 4a055b6..13411be 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -12,7 +12,7 @@
 #include <uapi/asm/unistd.h>
 
 
-#define __NR_syscalls		365
+#define __NR_syscalls		366
 
 #define __NR__exit __NR_exit
 #define NR_syscalls	__NR_syscalls
diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h
index 6ad58d4..6337738 100644
--- a/arch/powerpc/include/uapi/asm/unistd.h
+++ b/arch/powerpc/include/uapi/asm/unistd.h
@@ -387,5 +387,6 @@
 #define __NR_execveat		362
 #define __NR_switch_endian	363
 #define __NR_userfaultfd	364
+#define __NR_membarrier		365
 
 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [RFC PATCH 2/9] arm: allocate sys_membarrier system call number
@ 2015-08-27 17:56   ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api; +Cc: linux-kernel, Mathieu Desnoyers, Russell King

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: Russell King <linux@arm.linux.org.uk>
---
 arch/arm/include/asm/unistd.h      | 2 +-
 arch/arm/include/uapi/asm/unistd.h | 1 +
 arch/arm/kernel/calls.S            | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 32640c4..d93876c 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -19,7 +19,7 @@
  * This may need to be greater than __NR_last_syscall+1 in order to
  * account for the padding in the syscall table
  */
-#define __NR_syscalls  (388)
+#define __NR_syscalls  (389)
 
 /*
  * *NOTE*: This is a ghost syscall private to the kernel.  Only the
diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h
index 0c3f5a0..436bb32 100644
--- a/arch/arm/include/uapi/asm/unistd.h
+++ b/arch/arm/include/uapi/asm/unistd.h
@@ -414,6 +414,7 @@
 #define __NR_memfd_create		(__NR_SYSCALL_BASE+385)
 #define __NR_bpf			(__NR_SYSCALL_BASE+386)
 #define __NR_execveat			(__NR_SYSCALL_BASE+387)
+#define __NR_membarrier			(__NR_SYSCALL_BASE+388)
 
 /*
  * The following SWIs are ARM private.
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index 05745eb..310699c 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -397,6 +397,7 @@
 /* 385 */	CALL(sys_memfd_create)
 		CALL(sys_bpf)
 		CALL(sys_execveat)
+		CALL(sys_membarrier)
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [RFC PATCH 2/9] arm: allocate sys_membarrier system call number
@ 2015-08-27 17:56   ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Mathieu Desnoyers, Russell King

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
CC: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
CC: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
CC: Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
---
 arch/arm/include/asm/unistd.h      | 2 +-
 arch/arm/include/uapi/asm/unistd.h | 1 +
 arch/arm/kernel/calls.S            | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 32640c4..d93876c 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -19,7 +19,7 @@
  * This may need to be greater than __NR_last_syscall+1 in order to
  * account for the padding in the syscall table
  */
-#define __NR_syscalls  (388)
+#define __NR_syscalls  (389)
 
 /*
  * *NOTE*: This is a ghost syscall private to the kernel.  Only the
diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h
index 0c3f5a0..436bb32 100644
--- a/arch/arm/include/uapi/asm/unistd.h
+++ b/arch/arm/include/uapi/asm/unistd.h
@@ -414,6 +414,7 @@
 #define __NR_memfd_create		(__NR_SYSCALL_BASE+385)
 #define __NR_bpf			(__NR_SYSCALL_BASE+386)
 #define __NR_execveat			(__NR_SYSCALL_BASE+387)
+#define __NR_membarrier			(__NR_SYSCALL_BASE+388)
 
 /*
  * The following SWIs are ARM private.
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index 05745eb..310699c 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -397,6 +397,7 @@
 /* 385 */	CALL(sys_memfd_create)
 		CALL(sys_bpf)
 		CALL(sys_execveat)
+		CALL(sys_membarrier)
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [RFC PATCH 3/9] arm64: allocate sys_membarrier system call number
  2015-08-27 17:56 [RFC PATCH 0/9] allocate sys_membarrier system call number on major archs Mathieu Desnoyers
  2015-08-27 17:56 ` [RFC PATCH 1/9] powerpc: allocate sys_membarrier system call number Mathieu Desnoyers
  2015-08-27 17:56   ` Mathieu Desnoyers
@ 2015-08-27 17:56 ` Mathieu Desnoyers
  2015-09-02 10:10     ` Will Deacon
  2015-08-27 17:56 ` [RFC PATCH 4/9] mips: " Mathieu Desnoyers
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api
  Cc: linux-kernel, Mathieu Desnoyers, Catalin Marinas, Will Deacon

arm64 sys_membarrier number is already wired for arm64 through
asm-generic/unistd.h, but needs to be allocated separately for
the 32-bit compability layer of arm64.

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: Catalin Marinas <catalin.marinas@arm.com>
CC: Will Deacon <will.deacon@arm.com>
---
 arch/arm64/include/asm/unistd32.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h
index cef934a..d97be80 100644
--- a/arch/arm64/include/asm/unistd32.h
+++ b/arch/arm64/include/asm/unistd32.h
@@ -797,3 +797,5 @@ __SYSCALL(__NR_memfd_create, sys_memfd_create)
 __SYSCALL(__NR_bpf, sys_bpf)
 #define __NR_execveat 387
 __SYSCALL(__NR_execveat, compat_sys_execveat)
+#define __NR_membarrier 388
+__SYSCALL(__NR_membarrier, sys_membarrier)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [RFC PATCH 4/9] mips: allocate sys_membarrier system call number
  2015-08-27 17:56 [RFC PATCH 0/9] allocate sys_membarrier system call number on major archs Mathieu Desnoyers
                   ` (2 preceding siblings ...)
  2015-08-27 17:56 ` [RFC PATCH 3/9] arm64: " Mathieu Desnoyers
@ 2015-08-27 17:56 ` Mathieu Desnoyers
  2015-08-28  7:40     ` Ralf Baechle
  2015-08-27 17:56 ` [RFC PATCH 5/9] s390/s390x: " Mathieu Desnoyers
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api
  Cc: linux-kernel, Mathieu Desnoyers, Ralf Baechle, linux-mips

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: Ralf Baechle <ralf@linux-mips.org>
CC: linux-mips@linux-mips.org
---
 arch/mips/include/uapi/asm/unistd.h | 15 +++++++++------
 arch/mips/kernel/scall32-o32.S      |  1 +
 arch/mips/kernel/scall64-64.S       |  1 +
 arch/mips/kernel/scall64-n32.S      |  1 +
 arch/mips/kernel/scall64-o32.S      |  1 +
 5 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h
index d0bdfaa..b107983 100644
--- a/arch/mips/include/uapi/asm/unistd.h
+++ b/arch/mips/include/uapi/asm/unistd.h
@@ -378,16 +378,17 @@
 #define __NR_bpf			(__NR_Linux + 355)
 #define __NR_execveat			(__NR_Linux + 356)
 #define __NR_mlock2			(__NR_Linux + 357)
+#define __NR_membarrier			(__NR_Linux + 358)
 
 /*
  * Offset of the last Linux o32 flavoured syscall
  */
-#define __NR_Linux_syscalls		357
+#define __NR_Linux_syscalls		358
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
 
 #define __NR_O32_Linux			4000
-#define __NR_O32_Linux_syscalls		357
+#define __NR_O32_Linux_syscalls		358
 
 #if _MIPS_SIM == _MIPS_SIM_ABI64
 
@@ -713,16 +714,17 @@
 #define __NR_bpf			(__NR_Linux + 315)
 #define __NR_execveat			(__NR_Linux + 316)
 #define __NR_mlock2			(__NR_Linux + 317)
+#define __NR_membarrier			(__NR_Linux + 318)
 
 /*
  * Offset of the last Linux 64-bit flavoured syscall
  */
-#define __NR_Linux_syscalls		317
+#define __NR_Linux_syscalls		318
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
 
 #define __NR_64_Linux			5000
-#define __NR_64_Linux_syscalls		317
+#define __NR_64_Linux_syscalls		318
 
 #if _MIPS_SIM == _MIPS_SIM_NABI32
 
@@ -1052,15 +1054,16 @@
 #define __NR_bpf			(__NR_Linux + 319)
 #define __NR_execveat			(__NR_Linux + 320)
 #define __NR_mlock2			(__NR_Linux + 321)
+#define __NR_membarrier			(__NR_Linux + 322)
 
 /*
  * Offset of the last N32 flavoured syscall
  */
-#define __NR_Linux_syscalls		321
+#define __NR_Linux_syscalls		322
 
 #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
 
 #define __NR_N32_Linux			6000
-#define __NR_N32_Linux_syscalls		321
+#define __NR_N32_Linux_syscalls		322
 
 #endif /* _UAPI_ASM_UNISTD_H */
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index b0b377a..9265542 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -600,3 +600,4 @@ EXPORT(sys_call_table)
 	PTR	sys_bpf				/* 4355 */
 	PTR	sys_execveat
 	PTR	sys_mlock2
+	PTR	sys_membarrier
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index f12eb03..79d4fb0 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -437,4 +437,5 @@ EXPORT(sys_call_table)
 	PTR	sys_bpf				/* 5315 */
 	PTR	sys_execveat
 	PTR	sys_mlock2
+	PTR	sys_membarrier
 	.size	sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index ecdd65a..235892a 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -430,4 +430,5 @@ EXPORT(sysn32_call_table)
 	PTR	sys_bpf
 	PTR	compat_sys_execveat		/* 6320 */
 	PTR	sys_mlock2
+	PTR	sys_membarrier
 	.size	sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 7a8b2df..c051bd3 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -585,4 +585,5 @@ EXPORT(sys32_call_table)
 	PTR	sys_bpf				/* 4355 */
 	PTR	compat_sys_execveat
 	PTR	sys_mlock2
+	PTR	sys_membarrier
 	.size	sys32_call_table,.-sys32_call_table
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [RFC PATCH 5/9] s390/s390x: allocate sys_membarrier system call number
  2015-08-27 17:56 [RFC PATCH 0/9] allocate sys_membarrier system call number on major archs Mathieu Desnoyers
                   ` (3 preceding siblings ...)
  2015-08-27 17:56 ` [RFC PATCH 4/9] mips: " Mathieu Desnoyers
@ 2015-08-27 17:56 ` Mathieu Desnoyers
  2015-08-27 17:56   ` Mathieu Desnoyers
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api
  Cc: linux-kernel, Mathieu Desnoyers, Martin Schwidefsky,
	Heiko Carstens, linux-s390

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: Martin Schwidefsky <schwidefsky@de.ibm.com>
CC: Heiko Carstens <heiko.carstens@de.ibm.com>
CC: linux-s390@vger.kernel.org
---
 arch/s390/include/uapi/asm/unistd.h | 3 ++-
 arch/s390/kernel/syscalls.S         | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/s390/include/uapi/asm/unistd.h b/arch/s390/include/uapi/asm/unistd.h
index 59d2bb4..2f1de70 100644
--- a/arch/s390/include/uapi/asm/unistd.h
+++ b/arch/s390/include/uapi/asm/unistd.h
@@ -290,7 +290,8 @@
 #define __NR_s390_pci_mmio_write	352
 #define __NR_s390_pci_mmio_read		353
 #define __NR_execveat		354
-#define NR_syscalls 355
+#define __NR_membarrier		355
+#define NR_syscalls 356
 
 /* 
  * There are some system calls that are not present on 64 bit, some
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index f3f4a13..914c098 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -363,3 +363,4 @@ SYSCALL(sys_bpf,compat_sys_bpf)
 SYSCALL(sys_s390_pci_mmio_write,compat_sys_s390_pci_mmio_write)
 SYSCALL(sys_s390_pci_mmio_read,compat_sys_s390_pci_mmio_read)
 SYSCALL(sys_execveat,compat_sys_execveat)
+SYSCALL(sys_membarrier,sys_membarrier)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [RFC PATCH 6/9] sparc/sparc64: allocate sys_membarrier system call number
  2015-08-27 17:56 [RFC PATCH 0/9] allocate sys_membarrier system call number on major archs Mathieu Desnoyers
@ 2015-08-27 17:56   ` Mathieu Desnoyers
  2015-08-27 17:56   ` Mathieu Desnoyers
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api
  Cc: linux-kernel, Mathieu Desnoyers, David S. Miller, sparclinux

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: "David S. Miller" <davem@davemloft.net>
CC: sparclinux@vger.kernel.org
---
 arch/sparc/include/uapi/asm/unistd.h | 3 ++-
 arch/sparc/kernel/systbls_32.S       | 2 +-
 arch/sparc/kernel/systbls_64.S       | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/sparc/include/uapi/asm/unistd.h b/arch/sparc/include/uapi/asm/unistd.h
index 6f35f4d..efe9479 100644
--- a/arch/sparc/include/uapi/asm/unistd.h
+++ b/arch/sparc/include/uapi/asm/unistd.h
@@ -416,8 +416,9 @@
 #define __NR_memfd_create	348
 #define __NR_bpf		349
 #define __NR_execveat		350
+#define __NR_membarrier		351
 
-#define NR_syscalls		351
+#define NR_syscalls		352
 
 /* Bitmask values returned from kern_features system call.  */
 #define KERN_FEATURE_MIXED_MODE_STACK	0x00000001
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S
index e31a905..cc23b62 100644
--- a/arch/sparc/kernel/systbls_32.S
+++ b/arch/sparc/kernel/systbls_32.S
@@ -87,4 +87,4 @@ sys_call_table:
 /*335*/	.long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
 /*340*/	.long sys_ni_syscall, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
 /*345*/	.long sys_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
-/*350*/	.long sys_execveat
+/*350*/	.long sys_execveat, sys_membarrier
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S
index d72f76a..f229468 100644
--- a/arch/sparc/kernel/systbls_64.S
+++ b/arch/sparc/kernel/systbls_64.S
@@ -88,7 +88,7 @@ sys_call_table32:
 	.word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev
 /*340*/	.word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
 	.word sys32_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
-/*350*/	.word sys32_execveat
+/*350*/	.word sys32_execveat, sys_membarrier
 
 #endif /* CONFIG_COMPAT */
 
@@ -168,4 +168,4 @@ sys_call_table:
 	.word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
 /*340*/	.word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
 	.word sys_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
-/*350*/	.word sys64_execveat
+/*350*/	.word sys64_execveat, sys_membarrier
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [RFC PATCH 6/9] sparc/sparc64: allocate sys_membarrier system call number
@ 2015-08-27 17:56   ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api
  Cc: linux-kernel, Mathieu Desnoyers, David S. Miller, sparclinux

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: "David S. Miller" <davem@davemloft.net>
CC: sparclinux@vger.kernel.org
---
 arch/sparc/include/uapi/asm/unistd.h | 3 ++-
 arch/sparc/kernel/systbls_32.S       | 2 +-
 arch/sparc/kernel/systbls_64.S       | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/sparc/include/uapi/asm/unistd.h b/arch/sparc/include/uapi/asm/unistd.h
index 6f35f4d..efe9479 100644
--- a/arch/sparc/include/uapi/asm/unistd.h
+++ b/arch/sparc/include/uapi/asm/unistd.h
@@ -416,8 +416,9 @@
 #define __NR_memfd_create	348
 #define __NR_bpf		349
 #define __NR_execveat		350
+#define __NR_membarrier		351
 
-#define NR_syscalls		351
+#define NR_syscalls		352
 
 /* Bitmask values returned from kern_features system call.  */
 #define KERN_FEATURE_MIXED_MODE_STACK	0x00000001
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S
index e31a905..cc23b62 100644
--- a/arch/sparc/kernel/systbls_32.S
+++ b/arch/sparc/kernel/systbls_32.S
@@ -87,4 +87,4 @@ sys_call_table:
 /*335*/	.long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
 /*340*/	.long sys_ni_syscall, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
 /*345*/	.long sys_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
-/*350*/	.long sys_execveat
+/*350*/	.long sys_execveat, sys_membarrier
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S
index d72f76a..f229468 100644
--- a/arch/sparc/kernel/systbls_64.S
+++ b/arch/sparc/kernel/systbls_64.S
@@ -88,7 +88,7 @@ sys_call_table32:
 	.word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev
 /*340*/	.word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
 	.word sys32_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
-/*350*/	.word sys32_execveat
+/*350*/	.word sys32_execveat, sys_membarrier
 
 #endif /* CONFIG_COMPAT */
 
@@ -168,4 +168,4 @@ sys_call_table:
 	.word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
 /*340*/	.word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
 	.word sys_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
-/*350*/	.word sys64_execveat
+/*350*/	.word sys64_execveat, sys_membarrier
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [RFC PATCH 7/9] alpha: allocate sys_membarrier system call number
  2015-08-27 17:56 [RFC PATCH 0/9] allocate sys_membarrier system call number on major archs Mathieu Desnoyers
                   ` (5 preceding siblings ...)
  2015-08-27 17:56   ` Mathieu Desnoyers
@ 2015-08-27 17:56 ` Mathieu Desnoyers
  2015-08-27 18:34   ` Matt Turner
  2015-08-27 17:56   ` Mathieu Desnoyers
  2015-08-27 17:56 ` [RFC PATCH 9/9] parisc: " Mathieu Desnoyers
  8 siblings, 1 reply; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api
  Cc: linux-kernel, Mathieu Desnoyers, Richard Henderson,
	Ivan Kokshaysky, Matt Turner, linux-alpha

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: Richard Henderson <rth@twiddle.net>
CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
CC: Matt Turner <mattst88@gmail.com>
CC: linux-alpha@vger.kernel.org
---
 arch/alpha/include/uapi/asm/unistd.h | 1 +
 arch/alpha/kernel/systbls.S          | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h
index aa33bf5..7725619 100644
--- a/arch/alpha/include/uapi/asm/unistd.h
+++ b/arch/alpha/include/uapi/asm/unistd.h
@@ -475,5 +475,6 @@
 #define __NR_getrandom			511
 #define __NR_memfd_create		512
 #define __NR_execveat			513
+#define __NR_membarrier			514
 
 #endif /* _UAPI_ALPHA_UNISTD_H */
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
index 9b62e3f..1ea64f4 100644
--- a/arch/alpha/kernel/systbls.S
+++ b/arch/alpha/kernel/systbls.S
@@ -532,6 +532,7 @@ sys_call_table:
 	.quad sys_getrandom
 	.quad sys_memfd_create
 	.quad sys_execveat
+	.quad sys_membarrier
 
 	.size sys_call_table, . - sys_call_table
 	.type sys_call_table, @object
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [RFC PATCH 8/9] ia64: allocate sys_membarrier system call number
  2015-08-27 17:56 [RFC PATCH 0/9] allocate sys_membarrier system call number on major archs Mathieu Desnoyers
@ 2015-08-27 17:56   ` Mathieu Desnoyers
  2015-08-27 17:56   ` Mathieu Desnoyers
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api
  Cc: linux-kernel, Mathieu Desnoyers, Tony Luck, Fenghua Yu, linux-ia64

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: Tony Luck <tony.luck@intel.com>
CC: Fenghua Yu <fenghua.yu@intel.com>
CC: linux-ia64@vger.kernel.org
---
 arch/ia64/include/asm/unistd.h      | 2 +-
 arch/ia64/include/uapi/asm/unistd.h | 1 +
 arch/ia64/kernel/entry.S            | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h
index 95c39b9..1d54e17 100644
--- a/arch/ia64/include/asm/unistd.h
+++ b/arch/ia64/include/asm/unistd.h
@@ -11,7 +11,7 @@
 
 
 
-#define NR_syscalls			319 /* length of syscall table */
+#define NR_syscalls			320 /* length of syscall table */
 
 /*
  * The following defines stop scripts/checksyscalls.sh from complaining about
diff --git a/arch/ia64/include/uapi/asm/unistd.h b/arch/ia64/include/uapi/asm/unistd.h
index 4610795..b7aae55 100644
--- a/arch/ia64/include/uapi/asm/unistd.h
+++ b/arch/ia64/include/uapi/asm/unistd.h
@@ -332,5 +332,6 @@
 #define __NR_memfd_create		1340
 #define __NR_bpf			1341
 #define __NR_execveat			1342
+#define __NR_membarrier			1343
 
 #endif /* _UAPI_ASM_IA64_UNISTD_H */
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index ae0de7b..1ce01f9 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1768,5 +1768,6 @@ sys_call_table:
 	data8 sys_memfd_create			// 1340
 	data8 sys_bpf
 	data8 sys_execveat
+	data8 sys_membarrier
 
 	.org sys_call_table + 8*NR_syscalls	// guard against failures to increase NR_syscalls
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [RFC PATCH 8/9] ia64: allocate sys_membarrier system call number
@ 2015-08-27 17:56   ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api
  Cc: linux-kernel, Mathieu Desnoyers, Tony Luck, Fenghua Yu, linux-ia64

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: Tony Luck <tony.luck@intel.com>
CC: Fenghua Yu <fenghua.yu@intel.com>
CC: linux-ia64@vger.kernel.org
---
 arch/ia64/include/asm/unistd.h      | 2 +-
 arch/ia64/include/uapi/asm/unistd.h | 1 +
 arch/ia64/kernel/entry.S            | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h
index 95c39b9..1d54e17 100644
--- a/arch/ia64/include/asm/unistd.h
+++ b/arch/ia64/include/asm/unistd.h
@@ -11,7 +11,7 @@
 
 
 
-#define NR_syscalls			319 /* length of syscall table */
+#define NR_syscalls			320 /* length of syscall table */
 
 /*
  * The following defines stop scripts/checksyscalls.sh from complaining about
diff --git a/arch/ia64/include/uapi/asm/unistd.h b/arch/ia64/include/uapi/asm/unistd.h
index 4610795..b7aae55 100644
--- a/arch/ia64/include/uapi/asm/unistd.h
+++ b/arch/ia64/include/uapi/asm/unistd.h
@@ -332,5 +332,6 @@
 #define __NR_memfd_create		1340
 #define __NR_bpf			1341
 #define __NR_execveat			1342
+#define __NR_membarrier			1343
 
 #endif /* _UAPI_ASM_IA64_UNISTD_H */
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index ae0de7b..1ce01f9 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1768,5 +1768,6 @@ sys_call_table:
 	data8 sys_memfd_create			// 1340
 	data8 sys_bpf
 	data8 sys_execveat
+	data8 sys_membarrier
 
 	.org sys_call_table + 8*NR_syscalls	// guard against failures to increase NR_syscalls
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [RFC PATCH 9/9] parisc: allocate sys_membarrier system call number
  2015-08-27 17:56 [RFC PATCH 0/9] allocate sys_membarrier system call number on major archs Mathieu Desnoyers
                   ` (7 preceding siblings ...)
  2015-08-27 17:56   ` Mathieu Desnoyers
@ 2015-08-27 17:56 ` Mathieu Desnoyers
       [not found]   ` <1440698215-8355-10-git-send-email-mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
  8 siblings, 1 reply; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 17:56 UTC (permalink / raw)
  To: Andrew Morton, linux-api
  Cc: linux-kernel, Mathieu Desnoyers, James E.J. Bottomley,
	Helge Deller, linux-parisc

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: "James E.J. Bottomley" <jejb@parisc-linux.org>
CC: Helge Deller <deller@gmx.de>
CC: linux-parisc@vger.kernel.org
---
 arch/parisc/include/uapi/asm/unistd.h | 3 ++-
 arch/parisc/kernel/syscall_table.S    | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
index 2e639d7..dadcada 100644
--- a/arch/parisc/include/uapi/asm/unistd.h
+++ b/arch/parisc/include/uapi/asm/unistd.h
@@ -358,8 +358,9 @@
 #define __NR_memfd_create	(__NR_Linux + 340)
 #define __NR_bpf		(__NR_Linux + 341)
 #define __NR_execveat		(__NR_Linux + 342)
+#define __NR_membarrier		(__NR_Linux + 343)
 
-#define __NR_Linux_syscalls	(__NR_execveat + 1)
+#define __NR_Linux_syscalls	(__NR_membarrier + 1)
 
 
 #define __IGNORE_select		/* newselect */
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index 8eefb12..2faa43b 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -438,6 +438,7 @@
 	ENTRY_SAME(memfd_create)	/* 340 */
 	ENTRY_SAME(bpf)
 	ENTRY_COMP(execveat)
+	ENTRY_COMP(membarrier)
 
 
 .ifne (. - 90b) - (__NR_Linux_syscalls * (91b - 90b))
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 7/9] alpha: allocate sys_membarrier system call number
  2015-08-27 17:56 ` [RFC PATCH 7/9] alpha: " Mathieu Desnoyers
@ 2015-08-27 18:34   ` Matt Turner
  2015-08-27 19:06       ` Mathieu Desnoyers
  2015-08-27 19:07     ` [RFC PATCH v2] " Mathieu Desnoyers
  0 siblings, 2 replies; 40+ messages in thread
From: Matt Turner @ 2015-08-27 18:34 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Andrew Morton, linux-api, LKML, Richard Henderson,
	Ivan Kokshaysky, linux-alpha

On Thu, Aug 27, 2015 at 10:56 AM, Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: linux-api@vger.kernel.org
> CC: Richard Henderson <rth@twiddle.net>
> CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
> CC: Matt Turner <mattst88@gmail.com>
> CC: linux-alpha@vger.kernel.org
> ---
>  arch/alpha/include/uapi/asm/unistd.h | 1 +
>  arch/alpha/kernel/systbls.S          | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h
> index aa33bf5..7725619 100644
> --- a/arch/alpha/include/uapi/asm/unistd.h
> +++ b/arch/alpha/include/uapi/asm/unistd.h
> @@ -475,5 +475,6 @@
>  #define __NR_getrandom                 511
>  #define __NR_memfd_create              512
>  #define __NR_execveat                  513
> +#define __NR_membarrier                        514

NR_SYSCALLS in arch/alpha/include/asm/unistd.h needs to be updated as well.

>
>  #endif /* _UAPI_ALPHA_UNISTD_H */
> diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
> index 9b62e3f..1ea64f4 100644
> --- a/arch/alpha/kernel/systbls.S
> +++ b/arch/alpha/kernel/systbls.S
> @@ -532,6 +532,7 @@ sys_call_table:
>         .quad sys_getrandom
>         .quad sys_memfd_create
>         .quad sys_execveat
> +       .quad sys_membarrier
>
>         .size sys_call_table, . - sys_call_table
>         .type sys_call_table, @object
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 7/9] alpha: allocate sys_membarrier system call number
@ 2015-08-27 19:06       ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 19:06 UTC (permalink / raw)
  To: Matt Turner
  Cc: Andrew Morton, linux-api, LKML, Richard Henderson,
	Ivan Kokshaysky, linux-alpha



----- On Aug 27, 2015, at 2:34 PM, Matt Turner mattst88@gmail.com wrote:

> On Thu, Aug 27, 2015 at 10:56 AM, Mathieu Desnoyers
> <mathieu.desnoyers@efficios.com> wrote:
>> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>>   apply this patch, build/run a membarrier-enabled kernel, and do make
>>   kselftest. ]
>>
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> CC: Andrew Morton <akpm@linux-foundation.org>
>> CC: linux-api@vger.kernel.org
>> CC: Richard Henderson <rth@twiddle.net>
>> CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
>> CC: Matt Turner <mattst88@gmail.com>
>> CC: linux-alpha@vger.kernel.org
>> ---
>>  arch/alpha/include/uapi/asm/unistd.h | 1 +
>>  arch/alpha/kernel/systbls.S          | 1 +
>>  2 files changed, 2 insertions(+)
>>
>> diff --git a/arch/alpha/include/uapi/asm/unistd.h
>> b/arch/alpha/include/uapi/asm/unistd.h
>> index aa33bf5..7725619 100644
>> --- a/arch/alpha/include/uapi/asm/unistd.h
>> +++ b/arch/alpha/include/uapi/asm/unistd.h
>> @@ -475,5 +475,6 @@
>>  #define __NR_getrandom                 511
>>  #define __NR_memfd_create              512
>>  #define __NR_execveat                  513
>> +#define __NR_membarrier                        514
> 
> NR_SYSCALLS in arch/alpha/include/asm/unistd.h needs to be updated as well.
> 

Will send a v2 with this modif, thanks!

Mathieu

>>
>>  #endif /* _UAPI_ALPHA_UNISTD_H */
>> diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
>> index 9b62e3f..1ea64f4 100644
>> --- a/arch/alpha/kernel/systbls.S
>> +++ b/arch/alpha/kernel/systbls.S
>> @@ -532,6 +532,7 @@ sys_call_table:
>>         .quad sys_getrandom
>>         .quad sys_memfd_create
>>         .quad sys_execveat
>> +       .quad sys_membarrier
>>
>>         .size sys_call_table, . - sys_call_table
>>         .type sys_call_table, @object
>> --
>> 1.9.1

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 7/9] alpha: allocate sys_membarrier system call number
@ 2015-08-27 19:06       ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 19:06 UTC (permalink / raw)
  To: Matt Turner
  Cc: Andrew Morton, linux-api, LKML, Richard Henderson,
	Ivan Kokshaysky, linux-alpha



----- On Aug 27, 2015, at 2:34 PM, Matt Turner mattst88-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:

> On Thu, Aug 27, 2015 at 10:56 AM, Mathieu Desnoyers
> <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org> wrote:
>> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>>   apply this patch, build/run a membarrier-enabled kernel, and do make
>>   kselftest. ]
>>
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
>> CC: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
>> CC: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> CC: Richard Henderson <rth-hL46jP5Bxq7R7s880joybQ@public.gmane.org>
>> CC: Ivan Kokshaysky <ink-biIs/Y0ymYJMZLIVYojuPNP0rXTJTi09@public.gmane.org>
>> CC: Matt Turner <mattst88-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> CC: linux-alpha-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> ---
>>  arch/alpha/include/uapi/asm/unistd.h | 1 +
>>  arch/alpha/kernel/systbls.S          | 1 +
>>  2 files changed, 2 insertions(+)
>>
>> diff --git a/arch/alpha/include/uapi/asm/unistd.h
>> b/arch/alpha/include/uapi/asm/unistd.h
>> index aa33bf5..7725619 100644
>> --- a/arch/alpha/include/uapi/asm/unistd.h
>> +++ b/arch/alpha/include/uapi/asm/unistd.h
>> @@ -475,5 +475,6 @@
>>  #define __NR_getrandom                 511
>>  #define __NR_memfd_create              512
>>  #define __NR_execveat                  513
>> +#define __NR_membarrier                        514
> 
> NR_SYSCALLS in arch/alpha/include/asm/unistd.h needs to be updated as well.
> 

Will send a v2 with this modif, thanks!

Mathieu

>>
>>  #endif /* _UAPI_ALPHA_UNISTD_H */
>> diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
>> index 9b62e3f..1ea64f4 100644
>> --- a/arch/alpha/kernel/systbls.S
>> +++ b/arch/alpha/kernel/systbls.S
>> @@ -532,6 +532,7 @@ sys_call_table:
>>         .quad sys_getrandom
>>         .quad sys_memfd_create
>>         .quad sys_execveat
>> +       .quad sys_membarrier
>>
>>         .size sys_call_table, . - sys_call_table
>>         .type sys_call_table, @object
>> --
>> 1.9.1

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [RFC PATCH v2] alpha: allocate sys_membarrier system call number
  2015-08-27 18:34   ` Matt Turner
  2015-08-27 19:06       ` Mathieu Desnoyers
@ 2015-08-27 19:07     ` Mathieu Desnoyers
  1 sibling, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 19:07 UTC (permalink / raw)
  To: Andrew Morton, linux-api
  Cc: linux-kernel, Mathieu Desnoyers, Richard Henderson,
	Ivan Kokshaysky, Matt Turner, linux-alpha

[ Untested on this architecture. To try it out: fetch linux-next/akpm,
  apply this patch, build/run a membarrier-enabled kernel, and do make
  kselftest. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-api@vger.kernel.org
CC: Richard Henderson <rth@twiddle.net>
CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
CC: Matt Turner <mattst88@gmail.com>
CC: linux-alpha@vger.kernel.org
---
 arch/alpha/include/asm/unistd.h      | 2 +-
 arch/alpha/include/uapi/asm/unistd.h | 1 +
 arch/alpha/kernel/systbls.S          | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h
index a56e608..07aa4ca 100644
--- a/arch/alpha/include/asm/unistd.h
+++ b/arch/alpha/include/asm/unistd.h
@@ -3,7 +3,7 @@
 
 #include <uapi/asm/unistd.h>
 
-#define NR_SYSCALLS			514
+#define NR_SYSCALLS			515
 
 #define __ARCH_WANT_OLD_READDIR
 #define __ARCH_WANT_STAT64
diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h
index aa33bf5..7725619 100644
--- a/arch/alpha/include/uapi/asm/unistd.h
+++ b/arch/alpha/include/uapi/asm/unistd.h
@@ -475,5 +475,6 @@
 #define __NR_getrandom			511
 #define __NR_memfd_create		512
 #define __NR_execveat			513
+#define __NR_membarrier			514
 
 #endif /* _UAPI_ALPHA_UNISTD_H */
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
index 9b62e3f..1ea64f4 100644
--- a/arch/alpha/kernel/systbls.S
+++ b/arch/alpha/kernel/systbls.S
@@ -532,6 +532,7 @@ sys_call_table:
 	.quad sys_getrandom
 	.quad sys_memfd_create
 	.quad sys_execveat
+	.quad sys_membarrier
 
 	.size sys_call_table, . - sys_call_table
 	.type sys_call_table, @object
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 2/9] arm: allocate sys_membarrier system call number
  2015-08-27 17:56   ` Mathieu Desnoyers
  (?)
@ 2015-08-27 22:51   ` Russell King - ARM Linux
  2015-08-27 23:16       ` Mathieu Desnoyers
  -1 siblings, 1 reply; 40+ messages in thread
From: Russell King - ARM Linux @ 2015-08-27 22:51 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: Andrew Morton, linux-api, linux-kernel

On Thu, Aug 27, 2015 at 01:56:48PM -0400, Mathieu Desnoyers wrote:
> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]

But note: the system call is not guaranteed to be allocated at that number
until I've merged the patch.  I believe that there's other system calls
which are pending during the next merge window.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 6/9] sparc/sparc64: allocate sys_membarrier system call number
@ 2015-08-27 23:16     ` David Miller
  0 siblings, 0 replies; 40+ messages in thread
From: David Miller @ 2015-08-27 23:16 UTC (permalink / raw)
  To: mathieu.desnoyers; +Cc: akpm, linux-api, linux-kernel, sparclinux

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: Thu, 27 Aug 2015 13:56:52 -0400

> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 6/9] sparc/sparc64: allocate sys_membarrier system call number
@ 2015-08-27 23:16     ` David Miller
  0 siblings, 0 replies; 40+ messages in thread
From: David Miller @ 2015-08-27 23:16 UTC (permalink / raw)
  To: mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w
  Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	sparclinux-u79uwXL29TY76Z2rM5mHXA

From: Mathieu Desnoyers <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
Date: Thu, 27 Aug 2015 13:56:52 -0400

> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>

Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 6/9] sparc/sparc64: allocate sys_membarrier system call number
@ 2015-08-27 23:16     ` David Miller
  0 siblings, 0 replies; 40+ messages in thread
From: David Miller @ 2015-08-27 23:16 UTC (permalink / raw)
  To: mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w
  Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	sparclinux-u79uwXL29TY76Z2rM5mHXA

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: Thu, 27 Aug 2015 13:56:52 -0400

> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 2/9] arm: allocate sys_membarrier system call number
@ 2015-08-27 23:16       ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 23:16 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: Andrew Morton, linux-api, linux-kernel

----- On Aug 27, 2015, at 6:51 PM, Russell King - ARM Linux linux@arm.linux.org.uk wrote:

> On Thu, Aug 27, 2015 at 01:56:48PM -0400, Mathieu Desnoyers wrote:
>> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>>   apply this patch, build/run a membarrier-enabled kernel, and do make
>>   kselftest. ]
> 
> But note: the system call is not guaranteed to be allocated at that number
> until I've merged the patch.  I believe that there's other system calls
> which are pending during the next merge window.

Sure, no problem. I mainly want to make sure the system call
works fine on each major arch before we reach the merge window.

Let me know if you want me to send an updated version of this
patch during or after the merge window.

Thanks!

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 2/9] arm: allocate sys_membarrier system call number
@ 2015-08-27 23:16       ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-27 23:16 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Andrew Morton, linux-api, linux-kernel-u79uwXL29TY76Z2rM5mHXA

----- On Aug 27, 2015, at 6:51 PM, Russell King - ARM Linux linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org wrote:

> On Thu, Aug 27, 2015 at 01:56:48PM -0400, Mathieu Desnoyers wrote:
>> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>>   apply this patch, build/run a membarrier-enabled kernel, and do make
>>   kselftest. ]
> 
> But note: the system call is not guaranteed to be allocated at that number
> until I've merged the patch.  I believe that there's other system calls
> which are pending during the next merge window.

Sure, no problem. I mainly want to make sure the system call
works fine on each major arch before we reach the merge window.

Let me know if you want me to send an updated version of this
patch during or after the merge window.

Thanks!

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 4/9] mips: allocate sys_membarrier system call number
@ 2015-08-28  7:40     ` Ralf Baechle
  0 siblings, 0 replies; 40+ messages in thread
From: Ralf Baechle @ 2015-08-28  7:40 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: Andrew Morton, linux-api, linux-kernel, linux-mips

On Thu, Aug 27, 2015 at 01:56:50PM -0400, Mathieu Desnoyers wrote:

> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: linux-api@vger.kernel.org
> CC: Ralf Baechle <ralf@linux-mips.org>
> CC: linux-mips@linux-mips.org
> ---
>  arch/mips/include/uapi/asm/unistd.h | 15 +++++++++------
>  arch/mips/kernel/scall32-o32.S      |  1 +
>  arch/mips/kernel/scall64-64.S       |  1 +
>  arch/mips/kernel/scall64-n32.S      |  1 +
>  arch/mips/kernel/scall64-o32.S      |  1 +
>  5 files changed, 13 insertions(+), 6 deletions(-)

Looking good assuming there is no compat syscall required.

  Ralf

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 4/9] mips: allocate sys_membarrier system call number
@ 2015-08-28  7:40     ` Ralf Baechle
  0 siblings, 0 replies; 40+ messages in thread
From: Ralf Baechle @ 2015-08-28  7:40 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Andrew Morton, linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA

On Thu, Aug 27, 2015 at 01:56:50PM -0400, Mathieu Desnoyers wrote:

> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
> CC: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
> CC: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> CC: Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
> CC: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org
> ---
>  arch/mips/include/uapi/asm/unistd.h | 15 +++++++++------
>  arch/mips/kernel/scall32-o32.S      |  1 +
>  arch/mips/kernel/scall64-64.S       |  1 +
>  arch/mips/kernel/scall64-n32.S      |  1 +
>  arch/mips/kernel/scall64-o32.S      |  1 +
>  5 files changed, 13 insertions(+), 6 deletions(-)

Looking good assuming there is no compat syscall required.

  Ralf

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 4/9] mips: allocate sys_membarrier system call number
@ 2015-08-28 14:06       ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-28 14:06 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Andrew Morton, linux-api, linux-kernel, linux-mips

----- On Aug 28, 2015, at 3:40 AM, Ralf Baechle ralf@linux-mips.org wrote:

> On Thu, Aug 27, 2015 at 01:56:50PM -0400, Mathieu Desnoyers wrote:
> 
>> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>>   apply this patch, build/run a membarrier-enabled kernel, and do make
>>   kselftest. ]
>> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> CC: Andrew Morton <akpm@linux-foundation.org>
>> CC: linux-api@vger.kernel.org
>> CC: Ralf Baechle <ralf@linux-mips.org>
>> CC: linux-mips@linux-mips.org
>> ---
>>  arch/mips/include/uapi/asm/unistd.h | 15 +++++++++------
>>  arch/mips/kernel/scall32-o32.S      |  1 +
>>  arch/mips/kernel/scall64-64.S       |  1 +
>>  arch/mips/kernel/scall64-n32.S      |  1 +
>>  arch/mips/kernel/scall64-o32.S      |  1 +
>>  5 files changed, 13 insertions(+), 6 deletions(-)
> 
> Looking good assuming there is no compat syscall required.

Indeed, sys_membarrier only takes two integer arguments, so no
compat syscall is required.

Thanks!

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 4/9] mips: allocate sys_membarrier system call number
@ 2015-08-28 14:06       ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-28 14:06 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Andrew Morton, linux-api, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA

----- On Aug 28, 2015, at 3:40 AM, Ralf Baechle ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org wrote:

> On Thu, Aug 27, 2015 at 01:56:50PM -0400, Mathieu Desnoyers wrote:
> 
>> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>>   apply this patch, build/run a membarrier-enabled kernel, and do make
>>   kselftest. ]
>> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
>> CC: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
>> CC: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> CC: Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
>> CC: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org
>> ---
>>  arch/mips/include/uapi/asm/unistd.h | 15 +++++++++------
>>  arch/mips/kernel/scall32-o32.S      |  1 +
>>  arch/mips/kernel/scall64-64.S       |  1 +
>>  arch/mips/kernel/scall64-n32.S      |  1 +
>>  arch/mips/kernel/scall64-o32.S      |  1 +
>>  5 files changed, 13 insertions(+), 6 deletions(-)
> 
> Looking good assuming there is no compat syscall required.

Indeed, sys_membarrier only takes two integer arguments, so no
compat syscall is required.

Thanks!

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 1/9] powerpc: allocate sys_membarrier system call number
  2015-08-27 17:56 ` [RFC PATCH 1/9] powerpc: allocate sys_membarrier system call number Mathieu Desnoyers
@ 2015-08-31  6:54     ` Michael Ellerman
  0 siblings, 0 replies; 40+ messages in thread
From: Michael Ellerman @ 2015-08-31  6:54 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Andrew Morton, linux-api, linux-kernel, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev

On Thu, 2015-08-27 at 13:56 -0400, Mathieu Desnoyers wrote:
> Allow it to be used from SPU, since it should not have unwanted
> side-effects.
> 
> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: linux-api@vger.kernel.org
> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: Paul Mackerras <paulus@samba.org>
> CC: Michael Ellerman <mpe@ellerman.id.au>
> CC: linuxppc-dev@lists.ozlabs.org

Thanks.

I get:

$ ./membarrier_test
membarrier MEMBARRIER_CMD_QUERY syscall available.
membarrier: MEMBARRIER_CMD_SHARED success.
membarrier: tests done!

Which looks good.

Assuming the membarrier support hits 4.3, I'll take this via my tree for 4.3
also.

cheers



^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 1/9] powerpc: allocate sys_membarrier system call number
@ 2015-08-31  6:54     ` Michael Ellerman
  0 siblings, 0 replies; 40+ messages in thread
From: Michael Ellerman @ 2015-08-31  6:54 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Andrew Morton, linux-api, linux-kernel, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev

On Thu, 2015-08-27 at 13:56 -0400, Mathieu Desnoyers wrote:
> Allow it to be used from SPU, since it should not have unwanted
> side-effects.
> 
> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: linux-api@vger.kernel.org
> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: Paul Mackerras <paulus@samba.org>
> CC: Michael Ellerman <mpe@ellerman.id.au>
> CC: linuxppc-dev@lists.ozlabs.org

Thanks.

I get:

$ ./membarrier_test
membarrier MEMBARRIER_CMD_QUERY syscall available.
membarrier: MEMBARRIER_CMD_SHARED success.
membarrier: tests done!

Which looks good.

Assuming the membarrier support hits 4.3, I'll take this via my tree for 4.3
also.

cheers

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 1/9] powerpc: allocate sys_membarrier system call number
  2015-08-31  6:54     ` Michael Ellerman
  (?)
@ 2015-08-31 15:32     ` Mathieu Desnoyers
  2015-09-01  1:00         ` Michael Ellerman
  -1 siblings, 1 reply; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-08-31 15:32 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Andrew Morton, linux-api, linux-kernel, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev

----- On Aug 31, 2015, at 2:54 AM, Michael Ellerman mpe@ellerman.id.au wrote:

> On Thu, 2015-08-27 at 13:56 -0400, Mathieu Desnoyers wrote:
>> Allow it to be used from SPU, since it should not have unwanted
>> side-effects.
>> 
>> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>>   apply this patch, build/run a membarrier-enabled kernel, and do make
>>   kselftest. ]
>> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> CC: Andrew Morton <akpm@linux-foundation.org>
>> CC: linux-api@vger.kernel.org
>> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> CC: Paul Mackerras <paulus@samba.org>
>> CC: Michael Ellerman <mpe@ellerman.id.au>
>> CC: linuxppc-dev@lists.ozlabs.org
> 
> Thanks.
> 
> I get:
> 
> $ ./membarrier_test
> membarrier MEMBARRIER_CMD_QUERY syscall available.
> membarrier: MEMBARRIER_CMD_SHARED success.
> membarrier: tests done!
> 
> Which looks good.
> 
> Assuming the membarrier support hits 4.3, I'll take this via my tree for 4.3
> also.

Great! I'll take care of your comments about self-tests,

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 1/9] powerpc: allocate sys_membarrier system call number
@ 2015-09-01  1:00         ` Michael Ellerman
  0 siblings, 0 replies; 40+ messages in thread
From: Michael Ellerman @ 2015-09-01  1:00 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Andrew Morton, linux-api, linux-kernel, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev

On Mon, 2015-08-31 at 15:32 +0000, Mathieu Desnoyers wrote:
> ----- On Aug 31, 2015, at 2:54 AM, Michael Ellerman mpe@ellerman.id.au wrote:
> 
> > On Thu, 2015-08-27 at 13:56 -0400, Mathieu Desnoyers wrote:
> >> Allow it to be used from SPU, since it should not have unwanted
> >> side-effects.

> > $ ./membarrier_test
> > membarrier MEMBARRIER_CMD_QUERY syscall available.
> > membarrier: MEMBARRIER_CMD_SHARED success.
> > membarrier: tests done!
> > 
> > Which looks good.
> > 
> > Assuming the membarrier support hits 4.3, I'll take this via my tree for 4.3
> > also.
> 
> Great! I'll take care of your comments about self-tests,

Thanks. None of them are critical so we can always fix them later.

cheers



^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 1/9] powerpc: allocate sys_membarrier system call number
@ 2015-09-01  1:00         ` Michael Ellerman
  0 siblings, 0 replies; 40+ messages in thread
From: Michael Ellerman @ 2015-09-01  1:00 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Andrew Morton, linux-api, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

On Mon, 2015-08-31 at 15:32 +0000, Mathieu Desnoyers wrote:
> ----- On Aug 31, 2015, at 2:54 AM, Michael Ellerman mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org wrote:
> 
> > On Thu, 2015-08-27 at 13:56 -0400, Mathieu Desnoyers wrote:
> >> Allow it to be used from SPU, since it should not have unwanted
> >> side-effects.

> > $ ./membarrier_test
> > membarrier MEMBARRIER_CMD_QUERY syscall available.
> > membarrier: MEMBARRIER_CMD_SHARED success.
> > membarrier: tests done!
> > 
> > Which looks good.
> > 
> > Assuming the membarrier support hits 4.3, I'll take this via my tree for 4.3
> > also.
> 
> Great! I'll take care of your comments about self-tests,

Thanks. None of them are critical so we can always fix them later.

cheers

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 3/9] arm64: allocate sys_membarrier system call number
@ 2015-09-02 10:10     ` Will Deacon
  0 siblings, 0 replies; 40+ messages in thread
From: Will Deacon @ 2015-09-02 10:10 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: Andrew Morton, linux-api, linux-kernel, Catalin Marinas

On Thu, Aug 27, 2015 at 06:56:49PM +0100, Mathieu Desnoyers wrote:
> arm64 sys_membarrier number is already wired for arm64 through
> asm-generic/unistd.h, but needs to be allocated separately for
> the 32-bit compability layer of arm64.
> 
> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: linux-api@vger.kernel.org
> CC: Catalin Marinas <catalin.marinas@arm.com>
> CC: Will Deacon <will.deacon@arm.com>
> ---
>  arch/arm64/include/asm/unistd32.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h
> index cef934a..d97be80 100644
> --- a/arch/arm64/include/asm/unistd32.h
> +++ b/arch/arm64/include/asm/unistd32.h
> @@ -797,3 +797,5 @@ __SYSCALL(__NR_memfd_create, sys_memfd_create)
>  __SYSCALL(__NR_bpf, sys_bpf)
>  #define __NR_execveat 387
>  __SYSCALL(__NR_execveat, compat_sys_execveat)
> +#define __NR_membarrier 388
> +__SYSCALL(__NR_membarrier, sys_membarrier)

I think people have made similar comments for other architectures, but
please also updated __NR_compat_syscalls when adding new compat syscalls
here.

Will

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 3/9] arm64: allocate sys_membarrier system call number
@ 2015-09-02 10:10     ` Will Deacon
  0 siblings, 0 replies; 40+ messages in thread
From: Will Deacon @ 2015-09-02 10:10 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Andrew Morton, linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Catalin Marinas

On Thu, Aug 27, 2015 at 06:56:49PM +0100, Mathieu Desnoyers wrote:
> arm64 sys_membarrier number is already wired for arm64 through
> asm-generic/unistd.h, but needs to be allocated separately for
> the 32-bit compability layer of arm64.
> 
> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
> CC: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
> CC: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> CC: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>
> CC: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
> ---
>  arch/arm64/include/asm/unistd32.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h
> index cef934a..d97be80 100644
> --- a/arch/arm64/include/asm/unistd32.h
> +++ b/arch/arm64/include/asm/unistd32.h
> @@ -797,3 +797,5 @@ __SYSCALL(__NR_memfd_create, sys_memfd_create)
>  __SYSCALL(__NR_bpf, sys_bpf)
>  #define __NR_execveat 387
>  __SYSCALL(__NR_execveat, compat_sys_execveat)
> +#define __NR_membarrier 388
> +__SYSCALL(__NR_membarrier, sys_membarrier)

I think people have made similar comments for other architectures, but
please also updated __NR_compat_syscalls when adding new compat syscalls
here.

Will

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 9/9] parisc: allocate sys_membarrier system call number
  2015-08-27 17:56 ` [RFC PATCH 9/9] parisc: " Mathieu Desnoyers
@ 2015-09-03 12:26       ` Helge Deller
  0 siblings, 0 replies; 40+ messages in thread
From: Helge Deller @ 2015-09-03 12:26 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Andrew Morton, linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, James E.J. Bottomley,
	linux-parisc-u79uwXL29TY76Z2rM5mHXA

Hi Mathieu,

> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
> CC: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
> CC: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> CC: "James E.J. Bottomley" <jejb-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
> CC: Helge Deller <deller-Mmb7MZpHnFY@public.gmane.org>
> CC: linux-parisc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  arch/parisc/include/uapi/asm/unistd.h | 3 ++-
>  arch/parisc/kernel/syscall_table.S    | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
> index 2e639d7..dadcada 100644
> --- a/arch/parisc/include/uapi/asm/unistd.h
> +++ b/arch/parisc/include/uapi/asm/unistd.h
> @@ -358,8 +358,9 @@
>  #define __NR_memfd_create	(__NR_Linux + 340)
>  #define __NR_bpf		(__NR_Linux + 341)
>  #define __NR_execveat		(__NR_Linux + 342)
> +#define __NR_membarrier		(__NR_Linux + 343)
>  
> -#define __NR_Linux_syscalls	(__NR_execveat + 1)
> +#define __NR_Linux_syscalls	(__NR_membarrier + 1)
>  
>  
>  #define __IGNORE_select		/* newselect */
> diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
> index 8eefb12..2faa43b 100644
> --- a/arch/parisc/kernel/syscall_table.S
> +++ b/arch/parisc/kernel/syscall_table.S
> @@ -438,6 +438,7 @@
>  	ENTRY_SAME(memfd_create)	/* 340 */
>  	ENTRY_SAME(bpf)
>  	ENTRY_COMP(execveat)
> +	ENTRY_COMP(membarrier)

This needs to be ENTRY_SAME(membarrier), since you don't have/need a compat_membarrier() function.

After changing to ENTRY_SAME() I did run the kselftest on parisc: 
deller@ls3xx> ./membarrier_test 
membarrier MEMBARRIER_CMD_QUERY syscall available.
membarrier: MEMBARRIER_CMD_SHARED success.
membarrier: tests done!

Helge

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 9/9] parisc: allocate sys_membarrier system call number
@ 2015-09-03 12:26       ` Helge Deller
  0 siblings, 0 replies; 40+ messages in thread
From: Helge Deller @ 2015-09-03 12:26 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Andrew Morton, linux-api, linux-kernel, James E.J. Bottomley,
	linux-parisc

Hi Mathieu,

> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>   apply this patch, build/run a membarrier-enabled kernel, and do make
>   kselftest. ]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: linux-api@vger.kernel.org
> CC: "James E.J. Bottomley" <jejb@parisc-linux.org>
> CC: Helge Deller <deller@gmx.de>
> CC: linux-parisc@vger.kernel.org
> ---
>  arch/parisc/include/uapi/asm/unistd.h | 3 ++-
>  arch/parisc/kernel/syscall_table.S    | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
> index 2e639d7..dadcada 100644
> --- a/arch/parisc/include/uapi/asm/unistd.h
> +++ b/arch/parisc/include/uapi/asm/unistd.h
> @@ -358,8 +358,9 @@
>  #define __NR_memfd_create	(__NR_Linux + 340)
>  #define __NR_bpf		(__NR_Linux + 341)
>  #define __NR_execveat		(__NR_Linux + 342)
> +#define __NR_membarrier		(__NR_Linux + 343)
>  
> -#define __NR_Linux_syscalls	(__NR_execveat + 1)
> +#define __NR_Linux_syscalls	(__NR_membarrier + 1)
>  
>  
>  #define __IGNORE_select		/* newselect */
> diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
> index 8eefb12..2faa43b 100644
> --- a/arch/parisc/kernel/syscall_table.S
> +++ b/arch/parisc/kernel/syscall_table.S
> @@ -438,6 +438,7 @@
>  	ENTRY_SAME(memfd_create)	/* 340 */
>  	ENTRY_SAME(bpf)
>  	ENTRY_COMP(execveat)
> +	ENTRY_COMP(membarrier)

This needs to be ENTRY_SAME(membarrier), since you don't have/need a compat_membarrier() function.

After changing to ENTRY_SAME() I did run the kselftest on parisc: 
deller@ls3xx> ./membarrier_test 
membarrier MEMBARRIER_CMD_QUERY syscall available.
membarrier: MEMBARRIER_CMD_SHARED success.
membarrier: tests done!

Helge

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 3/9] arm64: allocate sys_membarrier system call number
@ 2015-09-03 15:38       ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-09-03 15:38 UTC (permalink / raw)
  To: Will Deacon; +Cc: Andrew Morton, linux-api, linux-kernel, Catalin Marinas



----- On Sep 2, 2015, at 6:10 AM, Will Deacon will.deacon@arm.com wrote:

> On Thu, Aug 27, 2015 at 06:56:49PM +0100, Mathieu Desnoyers wrote:
>> arm64 sys_membarrier number is already wired for arm64 through
>> asm-generic/unistd.h, but needs to be allocated separately for
>> the 32-bit compability layer of arm64.
>> 
>> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>>   apply this patch, build/run a membarrier-enabled kernel, and do make
>>   kselftest. ]
>> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> CC: Andrew Morton <akpm@linux-foundation.org>
>> CC: linux-api@vger.kernel.org
>> CC: Catalin Marinas <catalin.marinas@arm.com>
>> CC: Will Deacon <will.deacon@arm.com>
>> ---
>>  arch/arm64/include/asm/unistd32.h | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/arch/arm64/include/asm/unistd32.h
>> b/arch/arm64/include/asm/unistd32.h
>> index cef934a..d97be80 100644
>> --- a/arch/arm64/include/asm/unistd32.h
>> +++ b/arch/arm64/include/asm/unistd32.h
>> @@ -797,3 +797,5 @@ __SYSCALL(__NR_memfd_create, sys_memfd_create)
>>  __SYSCALL(__NR_bpf, sys_bpf)
>>  #define __NR_execveat 387
>>  __SYSCALL(__NR_execveat, compat_sys_execveat)
>> +#define __NR_membarrier 388
>> +__SYSCALL(__NR_membarrier, sys_membarrier)
> 
> I think people have made similar comments for other architectures, but
> please also updated __NR_compat_syscalls when adding new compat syscalls
> here.

Thanks for pointing it out! I'm fixing it for the next
RFC round.

Mathieu

> 
> Will

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 3/9] arm64: allocate sys_membarrier system call number
@ 2015-09-03 15:38       ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-09-03 15:38 UTC (permalink / raw)
  To: Will Deacon
  Cc: Andrew Morton, linux-api, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Catalin Marinas



----- On Sep 2, 2015, at 6:10 AM, Will Deacon will.deacon-5wv7dgnIgG8@public.gmane.org wrote:

> On Thu, Aug 27, 2015 at 06:56:49PM +0100, Mathieu Desnoyers wrote:
>> arm64 sys_membarrier number is already wired for arm64 through
>> asm-generic/unistd.h, but needs to be allocated separately for
>> the 32-bit compability layer of arm64.
>> 
>> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>>   apply this patch, build/run a membarrier-enabled kernel, and do make
>>   kselftest. ]
>> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
>> CC: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
>> CC: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> CC: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>
>> CC: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
>> ---
>>  arch/arm64/include/asm/unistd32.h | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/arch/arm64/include/asm/unistd32.h
>> b/arch/arm64/include/asm/unistd32.h
>> index cef934a..d97be80 100644
>> --- a/arch/arm64/include/asm/unistd32.h
>> +++ b/arch/arm64/include/asm/unistd32.h
>> @@ -797,3 +797,5 @@ __SYSCALL(__NR_memfd_create, sys_memfd_create)
>>  __SYSCALL(__NR_bpf, sys_bpf)
>>  #define __NR_execveat 387
>>  __SYSCALL(__NR_execveat, compat_sys_execveat)
>> +#define __NR_membarrier 388
>> +__SYSCALL(__NR_membarrier, sys_membarrier)
> 
> I think people have made similar comments for other architectures, but
> please also updated __NR_compat_syscalls when adding new compat syscalls
> here.

Thanks for pointing it out! I'm fixing it for the next
RFC round.

Mathieu

> 
> Will

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 9/9] parisc: allocate sys_membarrier system call number
  2015-09-03 12:26       ` Helge Deller
@ 2015-09-03 15:41         ` Mathieu Desnoyers
  -1 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-09-03 15:41 UTC (permalink / raw)
  To: Helge Deller
  Cc: Andrew Morton, linux-api, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	James E.J. Bottomley, linux-parisc-u79uwXL29TY76Z2rM5mHXA

----- On Sep 3, 2015, at 8:26 AM, Helge Deller deller-Mmb7MZpHnFY@public.gmane.org wrote:

> Hi Mathieu,
> 
>> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>>   apply this patch, build/run a membarrier-enabled kernel, and do make
>>   kselftest. ]
>> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
>> CC: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
>> CC: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> CC: "James E.J. Bottomley" <jejb-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
>> CC: Helge Deller <deller-Mmb7MZpHnFY@public.gmane.org>
>> CC: linux-parisc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> ---
>>  arch/parisc/include/uapi/asm/unistd.h | 3 ++-
>>  arch/parisc/kernel/syscall_table.S    | 1 +
>>  2 files changed, 3 insertions(+), 1 deletion(-)
>> 
>> diff --git a/arch/parisc/include/uapi/asm/unistd.h
>> b/arch/parisc/include/uapi/asm/unistd.h
>> index 2e639d7..dadcada 100644
>> --- a/arch/parisc/include/uapi/asm/unistd.h
>> +++ b/arch/parisc/include/uapi/asm/unistd.h
>> @@ -358,8 +358,9 @@
>>  #define __NR_memfd_create	(__NR_Linux + 340)
>>  #define __NR_bpf		(__NR_Linux + 341)
>>  #define __NR_execveat		(__NR_Linux + 342)
>> +#define __NR_membarrier		(__NR_Linux + 343)
>>  
>> -#define __NR_Linux_syscalls	(__NR_execveat + 1)
>> +#define __NR_Linux_syscalls	(__NR_membarrier + 1)
>>  
>>  
>>  #define __IGNORE_select		/* newselect */
>> diff --git a/arch/parisc/kernel/syscall_table.S
>> b/arch/parisc/kernel/syscall_table.S
>> index 8eefb12..2faa43b 100644
>> --- a/arch/parisc/kernel/syscall_table.S
>> +++ b/arch/parisc/kernel/syscall_table.S
>> @@ -438,6 +438,7 @@
>>  	ENTRY_SAME(memfd_create)	/* 340 */
>>  	ENTRY_SAME(bpf)
>>  	ENTRY_COMP(execveat)
>> +	ENTRY_COMP(membarrier)
> 
> This needs to be ENTRY_SAME(membarrier), since you don't have/need a
> compat_membarrier() function.

Allright, will fix.

> 
> After changing to ENTRY_SAME() I did run the kselftest on parisc:
> deller@ls3xx> ./membarrier_test
> membarrier MEMBARRIER_CMD_QUERY syscall available.
> membarrier: MEMBARRIER_CMD_SHARED success.
> membarrier: tests done!

And add your Tested-by tag, thanks!

Mathieu

> 
> Helge

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [RFC PATCH 9/9] parisc: allocate sys_membarrier system call number
@ 2015-09-03 15:41         ` Mathieu Desnoyers
  0 siblings, 0 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2015-09-03 15:41 UTC (permalink / raw)
  To: Helge Deller
  Cc: Andrew Morton, linux-api, linux-kernel, James E.J. Bottomley,
	linux-parisc

----- On Sep 3, 2015, at 8:26 AM, Helge Deller deller@gmx.de wrote:

> Hi Mathieu,
> 
>> [ Untested on this architecture. To try it out: fetch linux-next/akpm,
>>   apply this patch, build/run a membarrier-enabled kernel, and do make
>>   kselftest. ]
>> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> CC: Andrew Morton <akpm@linux-foundation.org>
>> CC: linux-api@vger.kernel.org
>> CC: "James E.J. Bottomley" <jejb@parisc-linux.org>
>> CC: Helge Deller <deller@gmx.de>
>> CC: linux-parisc@vger.kernel.org
>> ---
>>  arch/parisc/include/uapi/asm/unistd.h | 3 ++-
>>  arch/parisc/kernel/syscall_table.S    | 1 +
>>  2 files changed, 3 insertions(+), 1 deletion(-)
>> 
>> diff --git a/arch/parisc/include/uapi/asm/unistd.h
>> b/arch/parisc/include/uapi/asm/unistd.h
>> index 2e639d7..dadcada 100644
>> --- a/arch/parisc/include/uapi/asm/unistd.h
>> +++ b/arch/parisc/include/uapi/asm/unistd.h
>> @@ -358,8 +358,9 @@
>>  #define __NR_memfd_create	(__NR_Linux + 340)
>>  #define __NR_bpf		(__NR_Linux + 341)
>>  #define __NR_execveat		(__NR_Linux + 342)
>> +#define __NR_membarrier		(__NR_Linux + 343)
>>  
>> -#define __NR_Linux_syscalls	(__NR_execveat + 1)
>> +#define __NR_Linux_syscalls	(__NR_membarrier + 1)
>>  
>>  
>>  #define __IGNORE_select		/* newselect */
>> diff --git a/arch/parisc/kernel/syscall_table.S
>> b/arch/parisc/kernel/syscall_table.S
>> index 8eefb12..2faa43b 100644
>> --- a/arch/parisc/kernel/syscall_table.S
>> +++ b/arch/parisc/kernel/syscall_table.S
>> @@ -438,6 +438,7 @@
>>  	ENTRY_SAME(memfd_create)	/* 340 */
>>  	ENTRY_SAME(bpf)
>>  	ENTRY_COMP(execveat)
>> +	ENTRY_COMP(membarrier)
> 
> This needs to be ENTRY_SAME(membarrier), since you don't have/need a
> compat_membarrier() function.

Allright, will fix.

> 
> After changing to ENTRY_SAME() I did run the kselftest on parisc:
> deller@ls3xx> ./membarrier_test
> membarrier MEMBARRIER_CMD_QUERY syscall available.
> membarrier: MEMBARRIER_CMD_SHARED success.
> membarrier: tests done!

And add your Tested-by tag, thanks!

Mathieu

> 
> Helge

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2015-09-03 15:41 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-27 17:56 [RFC PATCH 0/9] allocate sys_membarrier system call number on major archs Mathieu Desnoyers
2015-08-27 17:56 ` [RFC PATCH 1/9] powerpc: allocate sys_membarrier system call number Mathieu Desnoyers
2015-08-31  6:54   ` Michael Ellerman
2015-08-31  6:54     ` Michael Ellerman
2015-08-31 15:32     ` Mathieu Desnoyers
2015-09-01  1:00       ` Michael Ellerman
2015-09-01  1:00         ` Michael Ellerman
2015-08-27 17:56 ` [RFC PATCH 2/9] arm: " Mathieu Desnoyers
2015-08-27 17:56   ` Mathieu Desnoyers
2015-08-27 22:51   ` Russell King - ARM Linux
2015-08-27 23:16     ` Mathieu Desnoyers
2015-08-27 23:16       ` Mathieu Desnoyers
2015-08-27 17:56 ` [RFC PATCH 3/9] arm64: " Mathieu Desnoyers
2015-09-02 10:10   ` Will Deacon
2015-09-02 10:10     ` Will Deacon
2015-09-03 15:38     ` Mathieu Desnoyers
2015-09-03 15:38       ` Mathieu Desnoyers
2015-08-27 17:56 ` [RFC PATCH 4/9] mips: " Mathieu Desnoyers
2015-08-28  7:40   ` Ralf Baechle
2015-08-28  7:40     ` Ralf Baechle
2015-08-28 14:06     ` Mathieu Desnoyers
2015-08-28 14:06       ` Mathieu Desnoyers
2015-08-27 17:56 ` [RFC PATCH 5/9] s390/s390x: " Mathieu Desnoyers
2015-08-27 17:56 ` [RFC PATCH 6/9] sparc/sparc64: " Mathieu Desnoyers
2015-08-27 17:56   ` Mathieu Desnoyers
2015-08-27 23:16   ` David Miller
2015-08-27 23:16     ` David Miller
2015-08-27 23:16     ` David Miller
2015-08-27 17:56 ` [RFC PATCH 7/9] alpha: " Mathieu Desnoyers
2015-08-27 18:34   ` Matt Turner
2015-08-27 19:06     ` Mathieu Desnoyers
2015-08-27 19:06       ` Mathieu Desnoyers
2015-08-27 19:07     ` [RFC PATCH v2] " Mathieu Desnoyers
2015-08-27 17:56 ` [RFC PATCH 8/9] ia64: " Mathieu Desnoyers
2015-08-27 17:56   ` Mathieu Desnoyers
2015-08-27 17:56 ` [RFC PATCH 9/9] parisc: " Mathieu Desnoyers
     [not found]   ` <1440698215-8355-10-git-send-email-mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2015-09-03 12:26     ` Helge Deller
2015-09-03 12:26       ` Helge Deller
2015-09-03 15:41       ` Mathieu Desnoyers
2015-09-03 15:41         ` Mathieu Desnoyers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.