aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 19:01:28 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 19:01:28 -0700
commita43cdf08a1b1ab3c013059b5fa4c1b7561e53cb7 (patch)
tree1d36874f77855cdfdaf4a86542933b1277162607 /include
parent97d41e90fe61399b99d74820cb7f2d6e0fbac91d (diff)
parent43b4f4061cf54aa225a1e94a969450ccf5305cd9 (diff)
downloadlinux-a43cdf08a1b1ab3c013059b5fa4c1b7561e53cb7.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] cell: fix bugs found by sparse [POWERPC] spiderpic: enable new style devtree support [POWERPC] Update cell_defconfig [POWERPC] spufs: add infrastructure for finding elf objects [POWERPC] spufs: support new OF device tree format [POWERPC] spufs: add support for read/write on cntl [POWERPC] spufs: remove support for ancient firmware [POWERPC] spufs: make mailbox functions handle multiple elements [POWERPC] spufs: use correct pg_prot for mapping SPU local store [POWERPC] spufs: Add infrastructure needed for gang scheduling [POWERPC] spufs: implement error event delivery to user space [POWERPC] spufs: fix context switch during page fault [POWERPC] spufs: scheduler support for NUMA. [POWERPC] spufs: cell spu problem state mapping updates
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/spu.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index b42b53c40f5dcb..e73ea00efd8b2e 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -138,6 +138,7 @@ struct spu {
void (* ibox_callback)(struct spu *spu);
void (* stop_callback)(struct spu *spu);
void (* mfc_callback)(struct spu *spu);
+ void (* dma_callback)(struct spu *spu, int type);
char irq_c0[8];
char irq_c1[8];
@@ -147,6 +148,7 @@ struct spu {
};
struct spu *spu_alloc(void);
+struct spu *spu_alloc_node(int node);
void spu_free(struct spu *spu);
int spu_irq_class_0_bottom(struct spu *spu);
int spu_irq_class_1_bottom(struct spu *spu);
@@ -168,6 +170,22 @@ extern struct spufs_calls {
struct module *owner;
} spufs_calls;
+/* return status from spu_run, same as in libspe */
+#define SPE_EVENT_DMA_ALIGNMENT 0x0008 /*A DMA alignment error */
+#define SPE_EVENT_SPE_ERROR 0x0010 /*An illegal instruction error*/
+#define SPE_EVENT_SPE_DATA_SEGMENT 0x0020 /*A DMA segmentation error */
+#define SPE_EVENT_SPE_DATA_STORAGE 0x0040 /*A DMA storage error */
+#define SPE_EVENT_INVALID_DMA 0x0800 /* Invalid MFC DMA */
+
+/*
+ * Flags for sys_spu_create.
+ */
+#define SPU_CREATE_EVENTS_ENABLED 0x0001
+#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);
void unregister_spu_syscalls(struct spufs_calls *calls);
@@ -183,6 +201,24 @@ static inline void unregister_spu_syscalls(struct spufs_calls *calls)
/*
+ * 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.
*/