diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2008-07-03 16:24:06 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-07-03 16:24:06 -0400 |
commit | e86322f611eef95aafaf726fd3965e5b211f1985 (patch) | |
tree | 28547e26df4fc6ae671dc8cc6912a53717e4db08 /arch/powerpc/platforms/cell/spufs/run.c | |
parent | b001a1b6aa960949a24c2cdc28257dfcc9428d74 (diff) | |
parent | 8948896c9e098c6fd31a6a698a598a7cbd7fa40e (diff) |
Merge branch 'for-bfields' of git://linux-nfs.org/~tomtucker/xprt-switch-2.6 into for-2.6.27
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/run.c')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/run.c | 21 |
1 files changed, 12 insertions, 9 deletions
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 | |
56 | top: | ||
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; |