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 <redacted>
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(-)
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 <redacted>
---
arch/arm64/include/asm/unistd32.h | 2 ++
1 file changed, 2 insertions(+)
[ 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(-)
[ 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 <redacted>
CC: Ivan Kokshaysky <redacted>
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(+)
From: Matt Turner <mattst88@gmail.com> Date: 2015-08-27 18:34:42
On Thu, Aug 27, 2015 at 10:56 AM, Mathieu Desnoyers
[off-list ref] wrote:
quoted hunk
[ 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 <redacted>
CC: Ivan Kokshaysky <redacted>
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(+)
----- 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
[off-list ref] wrote:
quoted
[ 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 <redacted>
CC: Ivan Kokshaysky <ink-biIs/Y0ymYJMZLIVYojuPNP0rXTJTi09@public.gmane.org>
CC: Matt Turner <redacted>
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
From: Russell King - ARM Linux <hidden> Date: 2015-08-27 22:51:57
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.
[ 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>
----- 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:
quoted
[ 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
----- 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:
quoted
[ 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
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2015-08-31 06:54:10
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 <redacted>
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
----- 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:
quoted
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 <redacted>
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
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2015-09-01 01:00:47
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:
quoted
On Thu, 2015-08-27 at 13:56 -0400, Mathieu Desnoyers wrote:
quoted
Allow it to be used from SPU, since it should not have unwanted
side-effects.
quoted
$ ./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
From: Will Deacon <hidden> Date: 2015-09-02 10:10:55
On Thu, Aug 27, 2015 at 06:56:49PM +0100, Mathieu Desnoyers wrote:
quoted hunk
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 <redacted>
CC: Will Deacon <redacted>
---
arch/arm64/include/asm/unistd32.h | 2 ++
1 file changed, 2 insertions(+)
I think people have made similar comments for other architectures, but
please also updated __NR_compat_syscalls when adding new compat syscalls
here.
Will
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
----- 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:
quoted
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 <redacted>
CC: Will Deacon <redacted>
---
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
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!