diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 22:01:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 22:01:28 -0400 |
commit | a43cdf08a1b1ab3c013059b5fa4c1b7561e53cb7 (patch) | |
tree | 1d36874f77855cdfdaf4a86542933b1277162607 /include | |
parent | 97d41e90fe61399b99d74820cb7f2d6e0fbac91d (diff) | |
parent | 43b4f4061cf54aa225a1e94a969450ccf5305cd9 (diff) |
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.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index b42b53c40f5d..e73ea00efd8b 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -138,6 +138,7 @@ struct spu { | |||
138 | void (* ibox_callback)(struct spu *spu); | 138 | void (* ibox_callback)(struct spu *spu); |
139 | void (* stop_callback)(struct spu *spu); | 139 | void (* stop_callback)(struct spu *spu); |
140 | void (* mfc_callback)(struct spu *spu); | 140 | void (* mfc_callback)(struct spu *spu); |
141 | void (* dma_callback)(struct spu *spu, int type); | ||
141 | 142 | ||
142 | char irq_c0[8]; | 143 | char irq_c0[8]; |
143 | char irq_c1[8]; | 144 | char irq_c1[8]; |
@@ -147,6 +148,7 @@ struct spu { | |||
147 | }; | 148 | }; |
148 | 149 | ||
149 | struct spu *spu_alloc(void); | 150 | struct spu *spu_alloc(void); |
151 | struct spu *spu_alloc_node(int node); | ||
150 | void spu_free(struct spu *spu); | 152 | void spu_free(struct spu *spu); |
151 | int spu_irq_class_0_bottom(struct spu *spu); | 153 | int spu_irq_class_0_bottom(struct spu *spu); |
152 | int spu_irq_class_1_bottom(struct spu *spu); | 154 | int spu_irq_class_1_bottom(struct spu *spu); |
@@ -168,6 +170,22 @@ extern struct spufs_calls { | |||
168 | struct module *owner; | 170 | struct module *owner; |
169 | } spufs_calls; | 171 | } spufs_calls; |
170 | 172 | ||
173 | /* return status from spu_run, same as in libspe */ | ||
174 | #define SPE_EVENT_DMA_ALIGNMENT 0x0008 /*A DMA alignment error */ | ||
175 | #define SPE_EVENT_SPE_ERROR 0x0010 /*An illegal instruction error*/ | ||
176 | #define SPE_EVENT_SPE_DATA_SEGMENT 0x0020 /*A DMA segmentation error */ | ||
177 | #define SPE_EVENT_SPE_DATA_STORAGE 0x0040 /*A DMA storage error */ | ||
178 | #define SPE_EVENT_INVALID_DMA 0x0800 /* Invalid MFC DMA */ | ||
179 | |||
180 | /* | ||
181 | * Flags for sys_spu_create. | ||
182 | */ | ||
183 | #define SPU_CREATE_EVENTS_ENABLED 0x0001 | ||
184 | #define SPU_CREATE_GANG 0x0002 | ||
185 | |||
186 | #define SPU_CREATE_FLAG_ALL 0x0003 /* mask of all valid flags */ | ||
187 | |||
188 | |||
171 | #ifdef CONFIG_SPU_FS_MODULE | 189 | #ifdef CONFIG_SPU_FS_MODULE |
172 | int register_spu_syscalls(struct spufs_calls *calls); | 190 | int register_spu_syscalls(struct spufs_calls *calls); |
173 | void unregister_spu_syscalls(struct spufs_calls *calls); | 191 | void unregister_spu_syscalls(struct spufs_calls *calls); |
@@ -183,6 +201,24 @@ static inline void unregister_spu_syscalls(struct spufs_calls *calls) | |||
183 | 201 | ||
184 | 202 | ||
185 | /* | 203 | /* |
204 | * Notifier blocks: | ||
205 | * | ||
206 | * oprofile can get notified when a context switch is performed | ||
207 | * on an spe. The notifer function that gets called is passed | ||
208 | * a pointer to the SPU structure as well as the object-id that | ||
209 | * identifies the binary running on that SPU now. | ||
210 | * | ||
211 | * For a context save, the object-id that is passed is zero, | ||
212 | * identifying that the kernel will run from that moment on. | ||
213 | * | ||
214 | * For a context restore, the object-id is the value written | ||
215 | * to object-id spufs file from user space and the notifer | ||
216 | * function can assume that spu->ctx is valid. | ||
217 | */ | ||
218 | int spu_switch_event_register(struct notifier_block * n); | ||
219 | int spu_switch_event_unregister(struct notifier_block * n); | ||
220 | |||
221 | /* | ||
186 | * This defines the Local Store, Problem Area and Privlege Area of an SPU. | 222 | * This defines the Local Store, Problem Area and Privlege Area of an SPU. |
187 | */ | 223 | */ |
188 | 224 | ||