Skip to content

Commit

Permalink
[POWERPC] spufs: Don't call spu_run_init from spu_reacquire_runnable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andre Detsch authored and Paul Mackerras committed Aug 30, 2007
1 parent 62ee68e commit ada83da
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions arch/powerpc/platforms/cell/spufs/run.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,7 @@ static int spu_reacquire_runnable(struct spu_context *ctx, u32 *npc,
if (ret)
return ret;

ret = spu_run_init(ctx, npc);
if (ret) {
spu_release(ctx);
return ret;
}
spuctx_switch_state(ctx, SPU_UTIL_USER);
return 0;
}

Expand Down

0 comments on commit ada83da

Please sign in to comment.