diff options
author | Andre Detsch <adetsch@br.ibm.com> | 2007-08-20 22:06:22 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-08-30 02:27:18 -0400 |
commit | ada83daab31c3ec35845785482124373a62f430c (patch) | |
tree | 3efd34d60cc2f38ecb6b80bf8861c8eb544cf8ef /arch/powerpc | |
parent | 62ee68e3bcb0d056aae5b36dea0388ca25572cdf (diff) |
[POWERPC] spufs: Don't call spu_run_init from spu_reacquire_runnable
This fixes a major bug which was happening when a SPU thread advances
its execution right after being restored to a SPU. A potentially
outdated NPC value was being (re)written to the SPU.
So, spu_run_init, in this case, was either not doing anything relevant,
or breaking the execution of the SPU thread.
This fixes a common problem of losing a mailbox write when it was done
to a saved context.
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/run.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index 6abdd8fe2098..958f10e90fdd 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c | |||
@@ -193,11 +193,7 @@ static int spu_reacquire_runnable(struct spu_context *ctx, u32 *npc, | |||
193 | if (ret) | 193 | if (ret) |
194 | return ret; | 194 | return ret; |
195 | 195 | ||
196 | ret = spu_run_init(ctx, npc); | 196 | spuctx_switch_state(ctx, SPU_UTIL_USER); |
197 | if (ret) { | ||
198 | spu_release(ctx); | ||
199 | return ret; | ||
200 | } | ||
201 | return 0; | 197 | return 0; |
202 | } | 198 | } |
203 | 199 | ||