Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60511
b: refs/heads/master
c: 0516923
h: refs/heads/master
i:
  60509: 22584d1
  60507: b004c56
  60503: 7762fc7
  60495: b6b42a2
  60479: e8e1cc2
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Jun 14, 2007
1 parent 55c482f commit 4ce3fe4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d5134ee8341bffc4f539049abb9e90d469b448d
refs/heads/master: 05169237b55058a3993fb4804d00b65dfa3e4a0c
12 changes: 11 additions & 1 deletion trunk/arch/powerpc/platforms/cell/spufs/run.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,12 @@ static int spu_run_init(struct spu_context *ctx, u32 * npc)
runcntl = SPU_RUNCNTL_RUNNABLE;
ctx->ops->runcntl_write(ctx, runcntl);
} else {
unsigned long mode = SPU_PRIVCNTL_MODE_NORMAL;
spu_start_tick(ctx);
ctx->ops->npc_write(ctx, *npc);
if (test_thread_flag(TIF_SINGLESTEP))
mode = SPU_PRIVCNTL_MODE_SINGLE_STEP;
out_be64(&ctx->spu->priv2->spu_privcntl_RW, mode);
ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE);
}

Expand Down Expand Up @@ -334,7 +338,8 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx,
ret = spu_process_events(ctx);

} while (!ret && !(status & (SPU_STATUS_STOPPED_BY_STOP |
SPU_STATUS_STOPPED_BY_HALT)));
SPU_STATUS_STOPPED_BY_HALT |
SPU_STATUS_SINGLE_STEP)));

ctx->ops->master_stop(ctx);
ret = spu_run_fini(ctx, npc, &status);
Expand All @@ -344,10 +349,15 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx,
if ((ret == 0) ||
((ret == -ERESTARTSYS) &&
((status & SPU_STATUS_STOPPED_BY_HALT) ||
(status & SPU_STATUS_SINGLE_STEP) ||
((status & SPU_STATUS_STOPPED_BY_STOP) &&
(status >> SPU_STOP_STATUS_SHIFT != 0x2104)))))
ret = status;

/* Note: we don't need to force_sig SIGTRAP on single-step
* since we have TIF_SINGLESTEP set, thus the kernel will do
* it upon return from the syscall anyawy
*/
if ((status & SPU_STATUS_STOPPED_BY_STOP)
&& (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) {
force_sig(SIGTRAP, current);
Expand Down

0 comments on commit 4ce3fe4

Please sign in to comment.