]> err.no Git - linux-2.6/blobdiff - include/asm-powerpc/spu.h
[PATCH] smbfs endianness annotations
[linux-2.6] / include / asm-powerpc / spu.h
index 87cc21e2194632d1e3a963c2cbed726935a4d573..e73ea00efd8b2ea7917a9820edbd94225b695cb6 100644 (file)
@@ -181,7 +181,10 @@ extern struct spufs_calls {
  * Flags for sys_spu_create.
  */
 #define SPU_CREATE_EVENTS_ENABLED      0x0001
-#define SPU_CREATE_FLAG_ALL            0x0001 /* mask of all valid flags */
+#define SPU_CREATE_GANG                        0x0002
+
+#define SPU_CREATE_FLAG_ALL            0x0003 /* mask of all valid flags */
+
 
 #ifdef CONFIG_SPU_FS_MODULE
 int register_spu_syscalls(struct spufs_calls *calls);
@@ -197,6 +200,24 @@ static inline void unregister_spu_syscalls(struct spufs_calls *calls)
 #endif /* MODULE */
 
 
+/*
+ * Notifier blocks:
+ *
+ * oprofile can get notified when a context switch is performed
+ * on an spe. The notifer function that gets called is passed
+ * a pointer to the SPU structure as well as the object-id that
+ * identifies the binary running on that SPU now.
+ *
+ * For a context save, the object-id that is passed is zero,
+ * identifying that the kernel will run from that moment on.
+ *
+ * For a context restore, the object-id is the value written
+ * to object-id spufs file from user space and the notifer
+ * function can assume that spu->ctx is valid.
+ */
+int spu_switch_event_register(struct notifier_block * n);
+int spu_switch_event_unregister(struct notifier_block * n);
+
 /*
  * This defines the Local Store, Problem Area and Privlege Area of an SPU.
  */