summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-04-27 23:17:16 +0200
committerJonathan Corbet <corbet@lwn.net>2020-05-05 09:22:24 -0600
commite2975d7ca8df8775409c948310bc0f39678d1612 (patch)
tree51cc54f3f9b1c5b26550b496a1fcc9d574508d82 /Documentation
parent299cd2747c61009f32943217c79f3c89728eb2ac (diff)
downloadlwn-e2975d7ca8df8775409c948310bc0f39678d1612.tar.gz
lwn-e2975d7ca8df8775409c948310bc0f39678d1612.zip
docs: filesystems: convert spufs/spu_run.txt to ReST
This file is at groff output format. Manually convert it to ReST format, trying to preserve a similar output after parsed. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/7d8ee1edf5ef0137009bc65ff0441826ce555895.1588021877.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/filesystems/spufs/index.rst1
-rw-r--r--Documentation/filesystems/spufs/spu_run.rst (renamed from Documentation/filesystems/spufs/spu_run.txt)65
2 files changed, 42 insertions, 24 deletions
diff --git a/Documentation/filesystems/spufs/index.rst b/Documentation/filesystems/spufs/index.rst
index 939cf59a7d9e..5ed4a8494967 100644
--- a/Documentation/filesystems/spufs/index.rst
+++ b/Documentation/filesystems/spufs/index.rst
@@ -10,3 +10,4 @@ SPU Filesystem
spufs
spu_create
+ spu_run
diff --git a/Documentation/filesystems/spufs/spu_run.txt b/Documentation/filesystems/spufs/spu_run.rst
index d5c6a00d0f97..7fdb1c31cb91 100644
--- a/Documentation/filesystems/spufs/spu_run.txt
+++ b/Documentation/filesystems/spufs/spu_run.rst
@@ -1,17 +1,26 @@
-SPU_RUN(2) Linux Programmer's Manual SPU_RUN(2)
+.. SPDX-License-Identifier: GPL-2.0
+=======
+spu_run
+=======
-NAME
+Name
+====
spu_run - execute an spu context
-SYNOPSIS
- #include <sys/spu.h>
+Synopsis
+========
- int spu_run(int fd, unsigned int *npc, unsigned int *event);
+ ::
-DESCRIPTION
+ #include <sys/spu.h>
+
+ int spu_run(int fd, unsigned int *npc, unsigned int *event);
+
+Description
+===========
The spu_run system call is used on PowerPC machines that implement the
Cell Broadband Engine Architecture in order to access Synergistic Pro-
cessor Units (SPUs). It uses the fd that was returned from spu_cre-
@@ -45,24 +54,31 @@ DESCRIPTION
If NULL is passed as the event argument, these errors will result in a
signal delivered to the calling process.
-RETURN VALUE
+Return Value
+============
spu_run returns the value of the spu_status register or -1 to indicate
an error and set errno to one of the error codes listed below. The
spu_status register value contains a bit mask of status codes and
optionally a 14 bit code returned from the stop-and-signal instruction
on the SPU. The bit masks for the status codes are:
- 0x02 SPU was stopped by stop-and-signal.
+ 0x02
+ SPU was stopped by stop-and-signal.
- 0x04 SPU was stopped by halt.
+ 0x04
+ SPU was stopped by halt.
- 0x08 SPU is waiting for a channel.
+ 0x08
+ SPU is waiting for a channel.
- 0x10 SPU is in single-step mode.
+ 0x10
+ SPU is in single-step mode.
- 0x20 SPU has tried to execute an invalid instruction.
+ 0x20
+ SPU has tried to execute an invalid instruction.
- 0x40 SPU has tried to access an invalid channel.
+ 0x40
+ SPU has tried to access an invalid channel.
0x3fff0000
The bits masked with this value contain the code returned from
@@ -71,7 +87,8 @@ RETURN VALUE
There are always one or more of the lower eight bits set or an error
code is returned from spu_run.
-ERRORS
+Errors
+======
EAGAIN or EWOULDBLOCK
fd is in non-blocking mode and spu_run would block.
@@ -93,29 +110,29 @@ ERRORS
not loaded.
-NOTES
+Notes
+=====
spu_run is meant to be used from libraries that implement a more
abstract interface to SPUs, not to be used from regular applications.
See http://www.bsc.es/projects/deepcomputing/linuxoncell/ for the rec-
ommended libraries.
-CONFORMING TO
+Conforming to
+=============
This call is Linux specific and only implemented by the ppc64 architec-
ture. Programs using this system call are not portable.
-BUGS
+Bugs
+====
The code does not yet fully implement all features lined out here.
-AUTHOR
+Author
+======
Arnd Bergmann <arndb@de.ibm.com>
-SEE ALSO
+See Also
+========
capabilities(7), close(2), spu_create(2), spufs(7)
-
-
-
-
-Linux 2005-09-28 SPU_RUN(2)