summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2007-07-20 21:39:47 +0200
committerArnd Bergmann <arnd@klappe.arndb.de>2007-07-20 21:42:15 +0200
commit8e68e2f248332a9c3fd4f08258f488c209bd3e0c (patch)
tree3001a5a8ce652ffdea97b2f89569447830b9059a /include
parent3ad216cae837d90415c605e1149e6fd88f51c973 (diff)
downloadlinux-3.10-8e68e2f248332a9c3fd4f08258f488c209bd3e0c.tar.gz
linux-3.10-8e68e2f248332a9c3fd4f08258f488c209bd3e0c.tar.bz2
linux-3.10-8e68e2f248332a9c3fd4f08258f488c209bd3e0c.zip
[CELL] spufs: extension of spu_create to support affinity definition
This patch adds support for additional flags at spu_create, which relate to the establishment of affinity between contexts and contexts to memory. A fourth, optional, parameter is supported. This parameter represent a affinity neighbor of the context being created, and is used when defining SPU-SPU affinity. Affinity is represented as a doubly linked list of spu_contexts. Signed-off-by: Andre Detsch <adetsch@br.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/spu.h8
-rw-r--r--include/linux/syscalls.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index 18e558bef98..24f352da286 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -196,6 +196,7 @@ extern struct cbe_spu_info cbe_spu_info[];
struct spu *spu_alloc(void);
struct spu *spu_alloc_node(int node);
+struct spu *spu_alloc_spu(struct spu *spu);
void spu_free(struct spu *spu);
int spu_irq_class_0_bottom(struct spu *spu);
int spu_irq_class_1_bottom(struct spu *spu);
@@ -227,7 +228,8 @@ extern long spu_sys_callback(struct spu_syscall_block *s);
struct file;
extern struct spufs_calls {
asmlinkage long (*create_thread)(const char __user *name,
- unsigned int flags, mode_t mode);
+ unsigned int flags, mode_t mode,
+ struct file *neighbor);
asmlinkage long (*spu_run)(struct file *filp, __u32 __user *unpc,
__u32 __user *ustatus);
struct module *owner;
@@ -254,8 +256,10 @@ struct spu_coredump_calls {
#define SPU_CREATE_GANG 0x0002
#define SPU_CREATE_NOSCHED 0x0004
#define SPU_CREATE_ISOLATE 0x0008
+#define SPU_CREATE_AFFINITY_SPU 0x0010
+#define SPU_CREATE_AFFINITY_MEM 0x0020
-#define SPU_CREATE_FLAG_ALL 0x000f /* mask of all valid flags */
+#define SPU_CREATE_FLAG_ALL 0x003f /* mask of all valid flags */
#ifdef CONFIG_SPU_FS_MODULE
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 7a8b1e3322e..61def7c8fbb 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -549,7 +549,7 @@ asmlinkage long sys_inotify_rm_watch(int fd, u32 wd);
asmlinkage long sys_spu_run(int fd, __u32 __user *unpc,
__u32 __user *ustatus);
asmlinkage long sys_spu_create(const char __user *name,
- unsigned int flags, mode_t mode);
+ unsigned int flags, mode_t mode, int fd);
asmlinkage long sys_mknodat(int dfd, const char __user * filename, int mode,
unsigned dev);