aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs')
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c12
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c203
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c47
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c21
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c28
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h19
-rw-r--r--arch/powerpc/platforms/cell/spufs/sputrace.c8
7 files changed, 232 insertions, 106 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 177735f79317..6653ddbed048 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -130,17 +130,17 @@ void spu_unmap_mappings(struct spu_context *ctx)
130 if (ctx->local_store) 130 if (ctx->local_store)
131 unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1); 131 unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1);
132 if (ctx->mfc) 132 if (ctx->mfc)
133 unmap_mapping_range(ctx->mfc, 0, 0x1000, 1); 133 unmap_mapping_range(ctx->mfc, 0, SPUFS_MFC_MAP_SIZE, 1);
134 if (ctx->cntl) 134 if (ctx->cntl)
135 unmap_mapping_range(ctx->cntl, 0, 0x1000, 1); 135 unmap_mapping_range(ctx->cntl, 0, SPUFS_CNTL_MAP_SIZE, 1);
136 if (ctx->signal1) 136 if (ctx->signal1)
137 unmap_mapping_range(ctx->signal1, 0, PAGE_SIZE, 1); 137 unmap_mapping_range(ctx->signal1, 0, SPUFS_SIGNAL_MAP_SIZE, 1);
138 if (ctx->signal2) 138 if (ctx->signal2)
139 unmap_mapping_range(ctx->signal2, 0, PAGE_SIZE, 1); 139 unmap_mapping_range(ctx->signal2, 0, SPUFS_SIGNAL_MAP_SIZE, 1);
140 if (ctx->mss) 140 if (ctx->mss)
141 unmap_mapping_range(ctx->mss, 0, 0x1000, 1); 141 unmap_mapping_range(ctx->mss, 0, SPUFS_MSS_MAP_SIZE, 1);
142 if (ctx->psmap) 142 if (ctx->psmap)
143 unmap_mapping_range(ctx->psmap, 0, 0x20000, 1); 143 unmap_mapping_range(ctx->psmap, 0, SPUFS_PS_MAP_SIZE, 1);
144 mutex_unlock(&ctx->mapping_lock); 144 mutex_unlock(&ctx->mapping_lock);
145} 145}
146 146
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index c81341ff75b5..99c73066b82f 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -238,11 +238,13 @@ spufs_mem_write(struct file *file, const char __user *buffer,
238 return size; 238 return size;
239} 239}
240 240
241static unsigned long spufs_mem_mmap_nopfn(struct vm_area_struct *vma, 241static int
242 unsigned long address) 242spufs_mem_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
243{ 243{
244 struct spu_context *ctx = vma->vm_file->private_data; 244 struct spu_context *ctx = vma->vm_file->private_data;
245 unsigned long pfn, offset, addr0 = address; 245 unsigned long address = (unsigned long)vmf->virtual_address;
246 unsigned long pfn, offset;
247
246#ifdef CONFIG_SPU_FS_64K_LS 248#ifdef CONFIG_SPU_FS_64K_LS
247 struct spu_state *csa = &ctx->csa; 249 struct spu_state *csa = &ctx->csa;
248 int psize; 250 int psize;
@@ -260,15 +262,15 @@ static unsigned long spufs_mem_mmap_nopfn(struct vm_area_struct *vma,
260 } 262 }
261#endif /* CONFIG_SPU_FS_64K_LS */ 263#endif /* CONFIG_SPU_FS_64K_LS */
262 264
263 offset = (address - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT); 265 offset = vmf->pgoff << PAGE_SHIFT;
264 if (offset >= LS_SIZE) 266 if (offset >= LS_SIZE)
265 return NOPFN_SIGBUS; 267 return VM_FAULT_SIGBUS;
266 268
267 pr_debug("spufs_mem_mmap_nopfn address=0x%lx -> 0x%lx, offset=0x%lx\n", 269 pr_debug("spufs_mem_mmap_fault address=0x%lx, offset=0x%lx\n",
268 addr0, address, offset); 270 address, offset);
269 271
270 if (spu_acquire(ctx)) 272 if (spu_acquire(ctx))
271 return NOPFN_REFAULT; 273 return VM_FAULT_NOPAGE;
272 274
273 if (ctx->state == SPU_STATE_SAVED) { 275 if (ctx->state == SPU_STATE_SAVED) {
274 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 276 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
@@ -283,12 +285,12 @@ static unsigned long spufs_mem_mmap_nopfn(struct vm_area_struct *vma,
283 285
284 spu_release(ctx); 286 spu_release(ctx);
285 287
286 return NOPFN_REFAULT; 288 return VM_FAULT_NOPAGE;
287} 289}
288 290
289 291
290static struct vm_operations_struct spufs_mem_mmap_vmops = { 292static struct vm_operations_struct spufs_mem_mmap_vmops = {
291 .nopfn = spufs_mem_mmap_nopfn, 293 .fault = spufs_mem_mmap_fault,
292}; 294};
293 295
294static int spufs_mem_mmap(struct file *file, struct vm_area_struct *vma) 296static int spufs_mem_mmap(struct file *file, struct vm_area_struct *vma)
@@ -351,20 +353,19 @@ static const struct file_operations spufs_mem_fops = {
351#endif 353#endif
352}; 354};
353 355
354static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma, 356static int spufs_ps_fault(struct vm_area_struct *vma,
355 unsigned long address, 357 struct vm_fault *vmf,
356 unsigned long ps_offs, 358 unsigned long ps_offs,
357 unsigned long ps_size) 359 unsigned long ps_size)
358{ 360{
359 struct spu_context *ctx = vma->vm_file->private_data; 361 struct spu_context *ctx = vma->vm_file->private_data;
360 unsigned long area, offset = address - vma->vm_start; 362 unsigned long area, offset = vmf->pgoff << PAGE_SHIFT;
361 int ret = 0; 363 int ret = 0;
362 364
363 spu_context_nospu_trace(spufs_ps_nopfn__enter, ctx); 365 spu_context_nospu_trace(spufs_ps_fault__enter, ctx);
364 366
365 offset += vma->vm_pgoff << PAGE_SHIFT;
366 if (offset >= ps_size) 367 if (offset >= ps_size)
367 return NOPFN_SIGBUS; 368 return VM_FAULT_SIGBUS;
368 369
369 /* 370 /*
370 * Because we release the mmap_sem, the context may be destroyed while 371 * Because we release the mmap_sem, the context may be destroyed while
@@ -378,7 +379,7 @@ static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma,
378 * pages to hand out to the user, but we don't want to wait 379 * pages to hand out to the user, but we don't want to wait
379 * with the mmap_sem held. 380 * with the mmap_sem held.
380 * It is possible to drop the mmap_sem here, but then we need 381 * It is possible to drop the mmap_sem here, but then we need
381 * to return NOPFN_REFAULT because the mappings may have 382 * to return VM_FAULT_NOPAGE because the mappings may have
382 * hanged. 383 * hanged.
383 */ 384 */
384 if (spu_acquire(ctx)) 385 if (spu_acquire(ctx))
@@ -386,14 +387,15 @@ static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma,
386 387
387 if (ctx->state == SPU_STATE_SAVED) { 388 if (ctx->state == SPU_STATE_SAVED) {
388 up_read(&current->mm->mmap_sem); 389 up_read(&current->mm->mmap_sem);
389 spu_context_nospu_trace(spufs_ps_nopfn__sleep, ctx); 390 spu_context_nospu_trace(spufs_ps_fault__sleep, ctx);
390 ret = spufs_wait(ctx->run_wq, ctx->state == SPU_STATE_RUNNABLE); 391 ret = spufs_wait(ctx->run_wq, ctx->state == SPU_STATE_RUNNABLE);
391 spu_context_trace(spufs_ps_nopfn__wake, ctx, ctx->spu); 392 spu_context_trace(spufs_ps_fault__wake, ctx, ctx->spu);
392 down_read(&current->mm->mmap_sem); 393 down_read(&current->mm->mmap_sem);
393 } else { 394 } else {
394 area = ctx->spu->problem_phys + ps_offs; 395 area = ctx->spu->problem_phys + ps_offs;
395 vm_insert_pfn(vma, address, (area + offset) >> PAGE_SHIFT); 396 vm_insert_pfn(vma, (unsigned long)vmf->virtual_address,
396 spu_context_trace(spufs_ps_nopfn__insert, ctx, ctx->spu); 397 (area + offset) >> PAGE_SHIFT);
398 spu_context_trace(spufs_ps_fault__insert, ctx, ctx->spu);
397 } 399 }
398 400
399 if (!ret) 401 if (!ret)
@@ -401,18 +403,18 @@ static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma,
401 403
402refault: 404refault:
403 put_spu_context(ctx); 405 put_spu_context(ctx);
404 return NOPFN_REFAULT; 406 return VM_FAULT_NOPAGE;
405} 407}
406 408
407#if SPUFS_MMAP_4K 409#if SPUFS_MMAP_4K
408static unsigned long spufs_cntl_mmap_nopfn(struct vm_area_struct *vma, 410static int spufs_cntl_mmap_fault(struct vm_area_struct *vma,
409 unsigned long address) 411 struct vm_fault *vmf)
410{ 412{
411 return spufs_ps_nopfn(vma, address, 0x4000, 0x1000); 413 return spufs_ps_fault(vma, vmf, 0x4000, SPUFS_CNTL_MAP_SIZE);
412} 414}
413 415
414static struct vm_operations_struct spufs_cntl_mmap_vmops = { 416static struct vm_operations_struct spufs_cntl_mmap_vmops = {
415 .nopfn = spufs_cntl_mmap_nopfn, 417 .fault = spufs_cntl_mmap_fault,
416}; 418};
417 419
418/* 420/*
@@ -1097,23 +1099,23 @@ static ssize_t spufs_signal1_write(struct file *file, const char __user *buf,
1097 return 4; 1099 return 4;
1098} 1100}
1099 1101
1100static unsigned long spufs_signal1_mmap_nopfn(struct vm_area_struct *vma, 1102static int
1101 unsigned long address) 1103spufs_signal1_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
1102{ 1104{
1103#if PAGE_SIZE == 0x1000 1105#if SPUFS_SIGNAL_MAP_SIZE == 0x1000
1104 return spufs_ps_nopfn(vma, address, 0x14000, 0x1000); 1106 return spufs_ps_fault(vma, vmf, 0x14000, SPUFS_SIGNAL_MAP_SIZE);
1105#elif PAGE_SIZE == 0x10000 1107#elif SPUFS_SIGNAL_MAP_SIZE == 0x10000
1106 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole 1108 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole
1107 * signal 1 and 2 area 1109 * signal 1 and 2 area
1108 */ 1110 */
1109 return spufs_ps_nopfn(vma, address, 0x10000, 0x10000); 1111 return spufs_ps_fault(vma, vmf, 0x10000, SPUFS_SIGNAL_MAP_SIZE);
1110#else 1112#else
1111#error unsupported page size 1113#error unsupported page size
1112#endif 1114#endif
1113} 1115}
1114 1116
1115static struct vm_operations_struct spufs_signal1_mmap_vmops = { 1117static struct vm_operations_struct spufs_signal1_mmap_vmops = {
1116 .nopfn = spufs_signal1_mmap_nopfn, 1118 .fault = spufs_signal1_mmap_fault,
1117}; 1119};
1118 1120
1119static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma) 1121static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma)
@@ -1234,23 +1236,23 @@ static ssize_t spufs_signal2_write(struct file *file, const char __user *buf,
1234} 1236}
1235 1237
1236#if SPUFS_MMAP_4K 1238#if SPUFS_MMAP_4K
1237static unsigned long spufs_signal2_mmap_nopfn(struct vm_area_struct *vma, 1239static int
1238 unsigned long address) 1240spufs_signal2_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
1239{ 1241{
1240#if PAGE_SIZE == 0x1000 1242#if SPUFS_SIGNAL_MAP_SIZE == 0x1000
1241 return spufs_ps_nopfn(vma, address, 0x1c000, 0x1000); 1243 return spufs_ps_fault(vma, vmf, 0x1c000, SPUFS_SIGNAL_MAP_SIZE);
1242#elif PAGE_SIZE == 0x10000 1244#elif SPUFS_SIGNAL_MAP_SIZE == 0x10000
1243 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole 1245 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole
1244 * signal 1 and 2 area 1246 * signal 1 and 2 area
1245 */ 1247 */
1246 return spufs_ps_nopfn(vma, address, 0x10000, 0x10000); 1248 return spufs_ps_fault(vma, vmf, 0x10000, SPUFS_SIGNAL_MAP_SIZE);
1247#else 1249#else
1248#error unsupported page size 1250#error unsupported page size
1249#endif 1251#endif
1250} 1252}
1251 1253
1252static struct vm_operations_struct spufs_signal2_mmap_vmops = { 1254static struct vm_operations_struct spufs_signal2_mmap_vmops = {
1253 .nopfn = spufs_signal2_mmap_nopfn, 1255 .fault = spufs_signal2_mmap_fault,
1254}; 1256};
1255 1257
1256static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma) 1258static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma)
@@ -1362,14 +1364,14 @@ DEFINE_SPUFS_ATTRIBUTE(spufs_signal2_type, spufs_signal2_type_get,
1362 spufs_signal2_type_set, "%llu\n", SPU_ATTR_ACQUIRE); 1364 spufs_signal2_type_set, "%llu\n", SPU_ATTR_ACQUIRE);
1363 1365
1364#if SPUFS_MMAP_4K 1366#if SPUFS_MMAP_4K
1365static unsigned long spufs_mss_mmap_nopfn(struct vm_area_struct *vma, 1367static int
1366 unsigned long address) 1368spufs_mss_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
1367{ 1369{
1368 return spufs_ps_nopfn(vma, address, 0x0000, 0x1000); 1370 return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_MSS_MAP_SIZE);
1369} 1371}
1370 1372
1371static struct vm_operations_struct spufs_mss_mmap_vmops = { 1373static struct vm_operations_struct spufs_mss_mmap_vmops = {
1372 .nopfn = spufs_mss_mmap_nopfn, 1374 .fault = spufs_mss_mmap_fault,
1373}; 1375};
1374 1376
1375/* 1377/*
@@ -1424,14 +1426,14 @@ static const struct file_operations spufs_mss_fops = {
1424 .mmap = spufs_mss_mmap, 1426 .mmap = spufs_mss_mmap,
1425}; 1427};
1426 1428
1427static unsigned long spufs_psmap_mmap_nopfn(struct vm_area_struct *vma, 1429static int
1428 unsigned long address) 1430spufs_psmap_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
1429{ 1431{
1430 return spufs_ps_nopfn(vma, address, 0x0000, 0x20000); 1432 return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_PS_MAP_SIZE);
1431} 1433}
1432 1434
1433static struct vm_operations_struct spufs_psmap_mmap_vmops = { 1435static struct vm_operations_struct spufs_psmap_mmap_vmops = {
1434 .nopfn = spufs_psmap_mmap_nopfn, 1436 .fault = spufs_psmap_mmap_fault,
1435}; 1437};
1436 1438
1437/* 1439/*
@@ -1484,14 +1486,14 @@ static const struct file_operations spufs_psmap_fops = {
1484 1486
1485 1487
1486#if SPUFS_MMAP_4K 1488#if SPUFS_MMAP_4K
1487static unsigned long spufs_mfc_mmap_nopfn(struct vm_area_struct *vma, 1489static int
1488 unsigned long address) 1490spufs_mfc_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
1489{ 1491{
1490 return spufs_ps_nopfn(vma, address, 0x3000, 0x1000); 1492 return spufs_ps_fault(vma, vmf, 0x3000, SPUFS_MFC_MAP_SIZE);
1491} 1493}
1492 1494
1493static struct vm_operations_struct spufs_mfc_mmap_vmops = { 1495static struct vm_operations_struct spufs_mfc_mmap_vmops = {
1494 .nopfn = spufs_mfc_mmap_nopfn, 1496 .fault = spufs_mfc_mmap_fault,
1495}; 1497};
1496 1498
1497/* 1499/*
@@ -2553,22 +2555,74 @@ void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx,
2553 wake_up(&ctx->switch_log->wait); 2555 wake_up(&ctx->switch_log->wait);
2554} 2556}
2555 2557
2556struct tree_descr spufs_dir_contents[] = { 2558static int spufs_show_ctx(struct seq_file *s, void *private)
2559{
2560 struct spu_context *ctx = s->private;
2561 u64 mfc_control_RW;
2562
2563 mutex_lock(&ctx->state_mutex);
2564 if (ctx->spu) {
2565 struct spu *spu = ctx->spu;
2566 struct spu_priv2 __iomem *priv2 = spu->priv2;
2567
2568 spin_lock_irq(&spu->register_lock);
2569 mfc_control_RW = in_be64(&priv2->mfc_control_RW);
2570 spin_unlock_irq(&spu->register_lock);
2571 } else {
2572 struct spu_state *csa = &ctx->csa;
2573
2574 mfc_control_RW = csa->priv2.mfc_control_RW;
2575 }
2576
2577 seq_printf(s, "%c flgs(%lx) sflgs(%lx) pri(%d) ts(%d) spu(%02d)"
2578 " %c %lx %lx %lx %lx %x %x\n",
2579 ctx->state == SPU_STATE_SAVED ? 'S' : 'R',
2580 ctx->flags,
2581 ctx->sched_flags,
2582 ctx->prio,
2583 ctx->time_slice,
2584 ctx->spu ? ctx->spu->number : -1,
2585 !list_empty(&ctx->rq) ? 'q' : ' ',
2586 ctx->csa.class_0_pending,
2587 ctx->csa.class_0_dar,
2588 ctx->csa.class_1_dsisr,
2589 mfc_control_RW,
2590 ctx->ops->runcntl_read(ctx),
2591 ctx->ops->status_read(ctx));
2592
2593 mutex_unlock(&ctx->state_mutex);
2594
2595 return 0;
2596}
2597
2598static int spufs_ctx_open(struct inode *inode, struct file *file)
2599{
2600 return single_open(file, spufs_show_ctx, SPUFS_I(inode)->i_ctx);
2601}
2602
2603static const struct file_operations spufs_ctx_fops = {
2604 .open = spufs_ctx_open,
2605 .read = seq_read,
2606 .llseek = seq_lseek,
2607 .release = single_release,
2608};
2609
2610struct spufs_tree_descr spufs_dir_contents[] = {
2557 { "capabilities", &spufs_caps_fops, 0444, }, 2611 { "capabilities", &spufs_caps_fops, 0444, },
2558 { "mem", &spufs_mem_fops, 0666, }, 2612 { "mem", &spufs_mem_fops, 0666, LS_SIZE, },
2559 { "regs", &spufs_regs_fops, 0666, }, 2613 { "regs", &spufs_regs_fops, 0666, sizeof(struct spu_reg128[128]), },
2560 { "mbox", &spufs_mbox_fops, 0444, }, 2614 { "mbox", &spufs_mbox_fops, 0444, },
2561 { "ibox", &spufs_ibox_fops, 0444, }, 2615 { "ibox", &spufs_ibox_fops, 0444, },
2562 { "wbox", &spufs_wbox_fops, 0222, }, 2616 { "wbox", &spufs_wbox_fops, 0222, },
2563 { "mbox_stat", &spufs_mbox_stat_fops, 0444, }, 2617 { "mbox_stat", &spufs_mbox_stat_fops, 0444, sizeof(u32), },
2564 { "ibox_stat", &spufs_ibox_stat_fops, 0444, }, 2618 { "ibox_stat", &spufs_ibox_stat_fops, 0444, sizeof(u32), },
2565 { "wbox_stat", &spufs_wbox_stat_fops, 0444, }, 2619 { "wbox_stat", &spufs_wbox_stat_fops, 0444, sizeof(u32), },
2566 { "signal1", &spufs_signal1_fops, 0666, }, 2620 { "signal1", &spufs_signal1_fops, 0666, },
2567 { "signal2", &spufs_signal2_fops, 0666, }, 2621 { "signal2", &spufs_signal2_fops, 0666, },
2568 { "signal1_type", &spufs_signal1_type, 0666, }, 2622 { "signal1_type", &spufs_signal1_type, 0666, },
2569 { "signal2_type", &spufs_signal2_type, 0666, }, 2623 { "signal2_type", &spufs_signal2_type, 0666, },
2570 { "cntl", &spufs_cntl_fops, 0666, }, 2624 { "cntl", &spufs_cntl_fops, 0666, },
2571 { "fpcr", &spufs_fpcr_fops, 0666, }, 2625 { "fpcr", &spufs_fpcr_fops, 0666, sizeof(struct spu_reg128), },
2572 { "lslr", &spufs_lslr_ops, 0444, }, 2626 { "lslr", &spufs_lslr_ops, 0444, },
2573 { "mfc", &spufs_mfc_fops, 0666, }, 2627 { "mfc", &spufs_mfc_fops, 0666, },
2574 { "mss", &spufs_mss_fops, 0666, }, 2628 { "mss", &spufs_mss_fops, 0666, },
@@ -2578,29 +2632,31 @@ struct tree_descr spufs_dir_contents[] = {
2578 { "decr_status", &spufs_decr_status_ops, 0666, }, 2632 { "decr_status", &spufs_decr_status_ops, 0666, },
2579 { "event_mask", &spufs_event_mask_ops, 0666, }, 2633 { "event_mask", &spufs_event_mask_ops, 0666, },
2580 { "event_status", &spufs_event_status_ops, 0444, }, 2634 { "event_status", &spufs_event_status_ops, 0444, },
2581 { "psmap", &spufs_psmap_fops, 0666, }, 2635 { "psmap", &spufs_psmap_fops, 0666, SPUFS_PS_MAP_SIZE, },
2582 { "phys-id", &spufs_id_ops, 0666, }, 2636 { "phys-id", &spufs_id_ops, 0666, },
2583 { "object-id", &spufs_object_id_ops, 0666, }, 2637 { "object-id", &spufs_object_id_ops, 0666, },
2584 { "mbox_info", &spufs_mbox_info_fops, 0444, }, 2638 { "mbox_info", &spufs_mbox_info_fops, 0444, sizeof(u32), },
2585 { "ibox_info", &spufs_ibox_info_fops, 0444, }, 2639 { "ibox_info", &spufs_ibox_info_fops, 0444, sizeof(u32), },
2586 { "wbox_info", &spufs_wbox_info_fops, 0444, }, 2640 { "wbox_info", &spufs_wbox_info_fops, 0444, sizeof(u32), },
2587 { "dma_info", &spufs_dma_info_fops, 0444, }, 2641 { "dma_info", &spufs_dma_info_fops, 0444,
2588 { "proxydma_info", &spufs_proxydma_info_fops, 0444, }, 2642 sizeof(struct spu_dma_info), },
2643 { "proxydma_info", &spufs_proxydma_info_fops, 0444,
2644 sizeof(struct spu_proxydma_info)},
2589 { "tid", &spufs_tid_fops, 0444, }, 2645 { "tid", &spufs_tid_fops, 0444, },
2590 { "stat", &spufs_stat_fops, 0444, }, 2646 { "stat", &spufs_stat_fops, 0444, },
2591 { "switch_log", &spufs_switch_log_fops, 0444 }, 2647 { "switch_log", &spufs_switch_log_fops, 0444 },
2592 {}, 2648 {},
2593}; 2649};
2594 2650
2595struct tree_descr spufs_dir_nosched_contents[] = { 2651struct spufs_tree_descr spufs_dir_nosched_contents[] = {
2596 { "capabilities", &spufs_caps_fops, 0444, }, 2652 { "capabilities", &spufs_caps_fops, 0444, },
2597 { "mem", &spufs_mem_fops, 0666, }, 2653 { "mem", &spufs_mem_fops, 0666, LS_SIZE, },
2598 { "mbox", &spufs_mbox_fops, 0444, }, 2654 { "mbox", &spufs_mbox_fops, 0444, },
2599 { "ibox", &spufs_ibox_fops, 0444, }, 2655 { "ibox", &spufs_ibox_fops, 0444, },
2600 { "wbox", &spufs_wbox_fops, 0222, }, 2656 { "wbox", &spufs_wbox_fops, 0222, },
2601 { "mbox_stat", &spufs_mbox_stat_fops, 0444, }, 2657 { "mbox_stat", &spufs_mbox_stat_fops, 0444, sizeof(u32), },
2602 { "ibox_stat", &spufs_ibox_stat_fops, 0444, }, 2658 { "ibox_stat", &spufs_ibox_stat_fops, 0444, sizeof(u32), },
2603 { "wbox_stat", &spufs_wbox_stat_fops, 0444, }, 2659 { "wbox_stat", &spufs_wbox_stat_fops, 0444, sizeof(u32), },
2604 { "signal1", &spufs_signal1_nosched_fops, 0222, }, 2660 { "signal1", &spufs_signal1_nosched_fops, 0222, },
2605 { "signal2", &spufs_signal2_nosched_fops, 0222, }, 2661 { "signal2", &spufs_signal2_nosched_fops, 0222, },
2606 { "signal1_type", &spufs_signal1_type, 0666, }, 2662 { "signal1_type", &spufs_signal1_type, 0666, },
@@ -2609,7 +2665,7 @@ struct tree_descr spufs_dir_nosched_contents[] = {
2609 { "mfc", &spufs_mfc_fops, 0666, }, 2665 { "mfc", &spufs_mfc_fops, 0666, },
2610 { "cntl", &spufs_cntl_fops, 0666, }, 2666 { "cntl", &spufs_cntl_fops, 0666, },
2611 { "npc", &spufs_npc_ops, 0666, }, 2667 { "npc", &spufs_npc_ops, 0666, },
2612 { "psmap", &spufs_psmap_fops, 0666, }, 2668 { "psmap", &spufs_psmap_fops, 0666, SPUFS_PS_MAP_SIZE, },
2613 { "phys-id", &spufs_id_ops, 0666, }, 2669 { "phys-id", &spufs_id_ops, 0666, },
2614 { "object-id", &spufs_object_id_ops, 0666, }, 2670 { "object-id", &spufs_object_id_ops, 0666, },
2615 { "tid", &spufs_tid_fops, 0444, }, 2671 { "tid", &spufs_tid_fops, 0444, },
@@ -2617,6 +2673,11 @@ struct tree_descr spufs_dir_nosched_contents[] = {
2617 {}, 2673 {},
2618}; 2674};
2619 2675
2676struct spufs_tree_descr spufs_dir_debug_contents[] = {
2677 { ".ctx", &spufs_ctx_fops, 0444, },
2678 {},
2679};
2680
2620struct spufs_coredump_reader spufs_coredump_read[] = { 2681struct spufs_coredump_reader spufs_coredump_read[] = {
2621 { "regs", __spufs_regs_read, NULL, sizeof(struct spu_reg128[128])}, 2682 { "regs", __spufs_regs_read, NULL, sizeof(struct spu_reg128[128])},
2622 { "fpcr", __spufs_fpcr_read, NULL, sizeof(struct spu_reg128) }, 2683 { "fpcr", __spufs_fpcr_read, NULL, sizeof(struct spu_reg128) },
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index f407b2471855..7123472801d9 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -42,10 +42,19 @@
42 42
43#include "spufs.h" 43#include "spufs.h"
44 44
45struct spufs_sb_info {
46 int debug;
47};
48
45static struct kmem_cache *spufs_inode_cache; 49static struct kmem_cache *spufs_inode_cache;
46char *isolated_loader; 50char *isolated_loader;
47static int isolated_loader_size; 51static int isolated_loader_size;
48 52
53static struct spufs_sb_info *spufs_get_sb_info(struct super_block *sb)
54{
55 return sb->s_fs_info;
56}
57
49static struct inode * 58static struct inode *
50spufs_alloc_inode(struct super_block *sb) 59spufs_alloc_inode(struct super_block *sb)
51{ 60{
@@ -109,7 +118,7 @@ spufs_setattr(struct dentry *dentry, struct iattr *attr)
109static int 118static int
110spufs_new_file(struct super_block *sb, struct dentry *dentry, 119spufs_new_file(struct super_block *sb, struct dentry *dentry,
111 const struct file_operations *fops, int mode, 120 const struct file_operations *fops, int mode,
112 struct spu_context *ctx) 121 size_t size, struct spu_context *ctx)
113{ 122{
114 static struct inode_operations spufs_file_iops = { 123 static struct inode_operations spufs_file_iops = {
115 .setattr = spufs_setattr, 124 .setattr = spufs_setattr,
@@ -125,6 +134,7 @@ spufs_new_file(struct super_block *sb, struct dentry *dentry,
125 ret = 0; 134 ret = 0;
126 inode->i_op = &spufs_file_iops; 135 inode->i_op = &spufs_file_iops;
127 inode->i_fop = fops; 136 inode->i_fop = fops;
137 inode->i_size = size;
128 inode->i_private = SPUFS_I(inode)->i_ctx = get_spu_context(ctx); 138 inode->i_private = SPUFS_I(inode)->i_ctx = get_spu_context(ctx);
129 d_add(dentry, inode); 139 d_add(dentry, inode);
130out: 140out:
@@ -177,7 +187,7 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir)
177 return simple_rmdir(parent, dir); 187 return simple_rmdir(parent, dir);
178} 188}
179 189
180static int spufs_fill_dir(struct dentry *dir, struct tree_descr *files, 190static int spufs_fill_dir(struct dentry *dir, struct spufs_tree_descr *files,
181 int mode, struct spu_context *ctx) 191 int mode, struct spu_context *ctx)
182{ 192{
183 struct dentry *dentry, *tmp; 193 struct dentry *dentry, *tmp;
@@ -189,7 +199,7 @@ static int spufs_fill_dir(struct dentry *dir, struct tree_descr *files,
189 if (!dentry) 199 if (!dentry)
190 goto out; 200 goto out;
191 ret = spufs_new_file(dir->d_sb, dentry, files->ops, 201 ret = spufs_new_file(dir->d_sb, dentry, files->ops,
192 files->mode & mode, ctx); 202 files->mode & mode, files->size, ctx);
193 if (ret) 203 if (ret)
194 goto out; 204 goto out;
195 files++; 205 files++;
@@ -279,6 +289,13 @@ spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,
279 if (ret) 289 if (ret)
280 goto out_free_ctx; 290 goto out_free_ctx;
281 291
292 if (spufs_get_sb_info(dir->i_sb)->debug)
293 ret = spufs_fill_dir(dentry, spufs_dir_debug_contents,
294 mode, ctx);
295
296 if (ret)
297 goto out_free_ctx;
298
282 d_instantiate(dentry, inode); 299 d_instantiate(dentry, inode);
283 dget(dentry); 300 dget(dentry);
284 dir->i_nlink++; 301 dir->i_nlink++;
@@ -639,18 +656,19 @@ out:
639 656
640/* File system initialization */ 657/* File system initialization */
641enum { 658enum {
642 Opt_uid, Opt_gid, Opt_mode, Opt_err, 659 Opt_uid, Opt_gid, Opt_mode, Opt_debug, Opt_err,
643}; 660};
644 661
645static match_table_t spufs_tokens = { 662static match_table_t spufs_tokens = {
646 { Opt_uid, "uid=%d" }, 663 { Opt_uid, "uid=%d" },
647 { Opt_gid, "gid=%d" }, 664 { Opt_gid, "gid=%d" },
648 { Opt_mode, "mode=%o" }, 665 { Opt_mode, "mode=%o" },
649 { Opt_err, NULL }, 666 { Opt_debug, "debug" },
667 { Opt_err, NULL },
650}; 668};
651 669
652static int 670static int
653spufs_parse_options(char *options, struct inode *root) 671spufs_parse_options(struct super_block *sb, char *options, struct inode *root)
654{ 672{
655 char *p; 673 char *p;
656 substring_t args[MAX_OPT_ARGS]; 674 substring_t args[MAX_OPT_ARGS];
@@ -678,6 +696,9 @@ spufs_parse_options(char *options, struct inode *root)
678 return 0; 696 return 0;
679 root->i_mode = option | S_IFDIR; 697 root->i_mode = option | S_IFDIR;
680 break; 698 break;
699 case Opt_debug:
700 spufs_get_sb_info(sb)->debug = 1;
701 break;
681 default: 702 default:
682 return 0; 703 return 0;
683 } 704 }
@@ -736,7 +757,7 @@ spufs_create_root(struct super_block *sb, void *data)
736 SPUFS_I(inode)->i_ctx = NULL; 757 SPUFS_I(inode)->i_ctx = NULL;
737 758
738 ret = -EINVAL; 759 ret = -EINVAL;
739 if (!spufs_parse_options(data, inode)) 760 if (!spufs_parse_options(sb, data, inode))
740 goto out_iput; 761 goto out_iput;
741 762
742 ret = -ENOMEM; 763 ret = -ENOMEM;
@@ -754,6 +775,7 @@ out:
754static int 775static int
755spufs_fill_super(struct super_block *sb, void *data, int silent) 776spufs_fill_super(struct super_block *sb, void *data, int silent)
756{ 777{
778 struct spufs_sb_info *info;
757 static struct super_operations s_ops = { 779 static struct super_operations s_ops = {
758 .alloc_inode = spufs_alloc_inode, 780 .alloc_inode = spufs_alloc_inode,
759 .destroy_inode = spufs_destroy_inode, 781 .destroy_inode = spufs_destroy_inode,
@@ -765,11 +787,16 @@ spufs_fill_super(struct super_block *sb, void *data, int silent)
765 787
766 save_mount_options(sb, data); 788 save_mount_options(sb, data);
767 789
790 info = kzalloc(sizeof(*info), GFP_KERNEL);
791 if (!info)
792 return -ENOMEM;
793
768 sb->s_maxbytes = MAX_LFS_FILESIZE; 794 sb->s_maxbytes = MAX_LFS_FILESIZE;
769 sb->s_blocksize = PAGE_CACHE_SIZE; 795 sb->s_blocksize = PAGE_CACHE_SIZE;
770 sb->s_blocksize_bits = PAGE_CACHE_SHIFT; 796 sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
771 sb->s_magic = SPUFS_MAGIC; 797 sb->s_magic = SPUFS_MAGIC;
772 sb->s_op = &s_ops; 798 sb->s_op = &s_ops;
799 sb->s_fs_info = info;
773 800
774 return spufs_create_root(sb, data); 801 return spufs_create_root(sb, data);
775} 802}
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index b7493b865812..f7edba6cb795 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -27,7 +27,6 @@ void spufs_stop_callback(struct spu *spu, int irq)
27 switch(irq) { 27 switch(irq) {
28 case 0 : 28 case 0 :
29 ctx->csa.class_0_pending = spu->class_0_pending; 29 ctx->csa.class_0_pending = spu->class_0_pending;
30 ctx->csa.class_0_dsisr = spu->class_0_dsisr;
31 ctx->csa.class_0_dar = spu->class_0_dar; 30 ctx->csa.class_0_dar = spu->class_0_dar;
32 break; 31 break;
33 case 1 : 32 case 1 :
@@ -51,18 +50,22 @@ int spu_stopped(struct spu_context *ctx, u32 *stat)
51 u64 dsisr; 50 u64 dsisr;
52 u32 stopped; 51 u32 stopped;
53 52
54 *stat = ctx->ops->status_read(ctx);
55
56 if (test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
57 return 1;
58
59 stopped = SPU_STATUS_INVALID_INSTR | SPU_STATUS_SINGLE_STEP | 53 stopped = SPU_STATUS_INVALID_INSTR | SPU_STATUS_SINGLE_STEP |
60 SPU_STATUS_STOPPED_BY_HALT | SPU_STATUS_STOPPED_BY_STOP; 54 SPU_STATUS_STOPPED_BY_HALT | SPU_STATUS_STOPPED_BY_STOP;
61 if (!(*stat & SPU_STATUS_RUNNING) && (*stat & stopped)) 55
56top:
57 *stat = ctx->ops->status_read(ctx);
58 if (*stat & stopped) {
59 /*
60 * If the spu hasn't finished stopping, we need to
61 * re-read the register to get the stopped value.
62 */
63 if (*stat & SPU_STATUS_RUNNING)
64 goto top;
62 return 1; 65 return 1;
66 }
63 67
64 dsisr = ctx->csa.class_0_dsisr; 68 if (test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
65 if (dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED))
66 return 1; 69 return 1;
67 70
68 dsisr = ctx->csa.class_1_dsisr; 71 dsisr = ctx->csa.class_1_dsisr;
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 745dd51ec37f..34654743363d 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -230,19 +230,23 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
230 ctx->stats.slb_flt_base = spu->stats.slb_flt; 230 ctx->stats.slb_flt_base = spu->stats.slb_flt;
231 ctx->stats.class2_intr_base = spu->stats.class2_intr; 231 ctx->stats.class2_intr_base = spu->stats.class2_intr;
232 232
233 spu_associate_mm(spu, ctx->owner);
234
235 spin_lock_irq(&spu->register_lock);
233 spu->ctx = ctx; 236 spu->ctx = ctx;
234 spu->flags = 0; 237 spu->flags = 0;
235 ctx->spu = spu; 238 ctx->spu = spu;
236 ctx->ops = &spu_hw_ops; 239 ctx->ops = &spu_hw_ops;
237 spu->pid = current->pid; 240 spu->pid = current->pid;
238 spu->tgid = current->tgid; 241 spu->tgid = current->tgid;
239 spu_associate_mm(spu, ctx->owner);
240 spu->ibox_callback = spufs_ibox_callback; 242 spu->ibox_callback = spufs_ibox_callback;
241 spu->wbox_callback = spufs_wbox_callback; 243 spu->wbox_callback = spufs_wbox_callback;
242 spu->stop_callback = spufs_stop_callback; 244 spu->stop_callback = spufs_stop_callback;
243 spu->mfc_callback = spufs_mfc_callback; 245 spu->mfc_callback = spufs_mfc_callback;
244 mb(); 246 spin_unlock_irq(&spu->register_lock);
247
245 spu_unmap_mappings(ctx); 248 spu_unmap_mappings(ctx);
249
246 spu_switch_log_notify(spu, ctx, SWITCH_LOG_START, 0); 250 spu_switch_log_notify(spu, ctx, SWITCH_LOG_START, 0);
247 spu_restore(&ctx->csa, spu); 251 spu_restore(&ctx->csa, spu);
248 spu->timestamp = jiffies; 252 spu->timestamp = jiffies;
@@ -403,6 +407,8 @@ static int has_affinity(struct spu_context *ctx)
403 */ 407 */
404static void spu_unbind_context(struct spu *spu, struct spu_context *ctx) 408static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
405{ 409{
410 u32 status;
411
406 spu_context_trace(spu_unbind_context__enter, ctx, spu); 412 spu_context_trace(spu_unbind_context__enter, ctx, spu);
407 413
408 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM); 414 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
@@ -423,18 +429,22 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
423 spu_unmap_mappings(ctx); 429 spu_unmap_mappings(ctx);
424 spu_save(&ctx->csa, spu); 430 spu_save(&ctx->csa, spu);
425 spu_switch_log_notify(spu, ctx, SWITCH_LOG_STOP, 0); 431 spu_switch_log_notify(spu, ctx, SWITCH_LOG_STOP, 0);
432
433 spin_lock_irq(&spu->register_lock);
426 spu->timestamp = jiffies; 434 spu->timestamp = jiffies;
427 ctx->state = SPU_STATE_SAVED; 435 ctx->state = SPU_STATE_SAVED;
428 spu->ibox_callback = NULL; 436 spu->ibox_callback = NULL;
429 spu->wbox_callback = NULL; 437 spu->wbox_callback = NULL;
430 spu->stop_callback = NULL; 438 spu->stop_callback = NULL;
431 spu->mfc_callback = NULL; 439 spu->mfc_callback = NULL;
432 spu_associate_mm(spu, NULL);
433 spu->pid = 0; 440 spu->pid = 0;
434 spu->tgid = 0; 441 spu->tgid = 0;
435 ctx->ops = &spu_backing_ops; 442 ctx->ops = &spu_backing_ops;
436 spu->flags = 0; 443 spu->flags = 0;
437 spu->ctx = NULL; 444 spu->ctx = NULL;
445 spin_unlock_irq(&spu->register_lock);
446
447 spu_associate_mm(spu, NULL);
438 448
439 ctx->stats.slb_flt += 449 ctx->stats.slb_flt +=
440 (spu->stats.slb_flt - ctx->stats.slb_flt_base); 450 (spu->stats.slb_flt - ctx->stats.slb_flt_base);
@@ -444,6 +454,9 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
444 /* This maps the underlying spu state to idle */ 454 /* This maps the underlying spu state to idle */
445 spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED); 455 spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED);
446 ctx->spu = NULL; 456 ctx->spu = NULL;
457
458 if (spu_stopped(ctx, &status))
459 wake_up_all(&ctx->stop_wq);
447} 460}
448 461
449/** 462/**
@@ -886,7 +899,8 @@ static noinline void spusched_tick(struct spu_context *ctx)
886 spu_add_to_rq(ctx); 899 spu_add_to_rq(ctx);
887 } else { 900 } else {
888 spu_context_nospu_trace(spusched_tick__newslice, ctx); 901 spu_context_nospu_trace(spusched_tick__newslice, ctx);
889 ctx->time_slice++; 902 if (!ctx->time_slice)
903 ctx->time_slice++;
890 } 904 }
891out: 905out:
892 spu_release(ctx); 906 spu_release(ctx);
@@ -980,6 +994,7 @@ void spuctx_switch_state(struct spu_context *ctx,
980 struct timespec ts; 994 struct timespec ts;
981 struct spu *spu; 995 struct spu *spu;
982 enum spu_utilization_state old_state; 996 enum spu_utilization_state old_state;
997 int node;
983 998
984 ktime_get_ts(&ts); 999 ktime_get_ts(&ts);
985 curtime = timespec_to_ns(&ts); 1000 curtime = timespec_to_ns(&ts);
@@ -1001,6 +1016,11 @@ void spuctx_switch_state(struct spu_context *ctx,
1001 spu->stats.times[old_state] += delta; 1016 spu->stats.times[old_state] += delta;
1002 spu->stats.util_state = new_state; 1017 spu->stats.util_state = new_state;
1003 spu->stats.tstamp = curtime; 1018 spu->stats.tstamp = curtime;
1019 node = spu->node;
1020 if (old_state == SPU_UTIL_USER)
1021 atomic_dec(&cbe_spu_info[node].busy_spus);
1022 if (new_state == SPU_UTIL_USER);
1023 atomic_inc(&cbe_spu_info[node].busy_spus);
1004 } 1024 }
1005} 1025}
1006 1026
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index 454c277c1457..8ae8ef9dfc22 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -32,6 +32,13 @@
32#include <asm/spu_csa.h> 32#include <asm/spu_csa.h>
33#include <asm/spu_info.h> 33#include <asm/spu_info.h>
34 34
35#define SPUFS_PS_MAP_SIZE 0x20000
36#define SPUFS_MFC_MAP_SIZE 0x1000
37#define SPUFS_CNTL_MAP_SIZE 0x1000
38#define SPUFS_CNTL_MAP_SIZE 0x1000
39#define SPUFS_SIGNAL_MAP_SIZE PAGE_SIZE
40#define SPUFS_MSS_MAP_SIZE 0x1000
41
35/* The magic number for our file system */ 42/* The magic number for our file system */
36enum { 43enum {
37 SPUFS_MAGIC = 0x23c9b64e, 44 SPUFS_MAGIC = 0x23c9b64e,
@@ -228,8 +235,16 @@ struct spufs_inode_info {
228#define SPUFS_I(inode) \ 235#define SPUFS_I(inode) \
229 container_of(inode, struct spufs_inode_info, vfs_inode) 236 container_of(inode, struct spufs_inode_info, vfs_inode)
230 237
231extern struct tree_descr spufs_dir_contents[]; 238struct spufs_tree_descr {
232extern struct tree_descr spufs_dir_nosched_contents[]; 239 const char *name;
240 const struct file_operations *ops;
241 int mode;
242 size_t size;
243};
244
245extern struct spufs_tree_descr spufs_dir_contents[];
246extern struct spufs_tree_descr spufs_dir_nosched_contents[];
247extern struct spufs_tree_descr spufs_dir_debug_contents[];
233 248
234/* system call implementation */ 249/* system call implementation */
235extern struct spufs_calls spufs_calls; 250extern struct spufs_calls spufs_calls;
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c
index 53202422ba72..8c0e95766a62 100644
--- a/arch/powerpc/platforms/cell/spufs/sputrace.c
+++ b/arch/powerpc/platforms/cell/spufs/sputrace.c
@@ -182,10 +182,10 @@ struct spu_probe spu_probes[] = {
182 { "spu_yield__enter", "ctx %p", spu_context_nospu_event }, 182 { "spu_yield__enter", "ctx %p", spu_context_nospu_event },
183 { "spu_deactivate__enter", "ctx %p", spu_context_nospu_event }, 183 { "spu_deactivate__enter", "ctx %p", spu_context_nospu_event },
184 { "__spu_deactivate__unload", "ctx %p spu %p", spu_context_event }, 184 { "__spu_deactivate__unload", "ctx %p spu %p", spu_context_event },
185 { "spufs_ps_nopfn__enter", "ctx %p", spu_context_nospu_event }, 185 { "spufs_ps_fault__enter", "ctx %p", spu_context_nospu_event },
186 { "spufs_ps_nopfn__sleep", "ctx %p", spu_context_nospu_event }, 186 { "spufs_ps_fault__sleep", "ctx %p", spu_context_nospu_event },
187 { "spufs_ps_nopfn__wake", "ctx %p spu %p", spu_context_event }, 187 { "spufs_ps_fault__wake", "ctx %p spu %p", spu_context_event },
188 { "spufs_ps_nopfn__insert", "ctx %p spu %p", spu_context_event }, 188 { "spufs_ps_fault__insert", "ctx %p spu %p", spu_context_event },
189 { "spu_acquire_saved__enter", "ctx %p", spu_context_nospu_event }, 189 { "spu_acquire_saved__enter", "ctx %p", spu_context_nospu_event },
190 { "destroy_spu_context__enter", "ctx %p", spu_context_nospu_event }, 190 { "destroy_spu_context__enter", "ctx %p", spu_context_nospu_event },
191 { "spufs_stop_callback__enter", "ctx %p spu %p", spu_context_event }, 191 { "spufs_stop_callback__enter", "ctx %p spu %p", spu_context_event },