diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2008-01-10 23:03:26 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-02-06 00:26:59 -0500 |
commit | 60cf54db47727935af1c439f59c636a96a8cbd4b (patch) | |
tree | 2cf1b2e8351741a3c6656bdd4574c4e90b47415a /arch/powerpc | |
parent | 038200cfdc6467fa8100c5b9c3b81730f0158370 (diff) |
[POWERPC] spufs: Fix SPE single-step mode
Currently we only catch debug events through the 0x3fff status;
spufs_run_spu doesn't handle single-step SPE events.
This change adds a handler for conditions where the SPE is stopped due
to single-step-mode.
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 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index c01a09da1e56..b4814c740d8a 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c | |||
@@ -410,8 +410,11 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event) | |||
410 | * since we have TIF_SINGLESTEP set, thus the kernel will do | 410 | * since we have TIF_SINGLESTEP set, thus the kernel will do |
411 | * it upon return from the syscall anyawy | 411 | * it upon return from the syscall anyawy |
412 | */ | 412 | */ |
413 | if ((status & SPU_STATUS_STOPPED_BY_STOP) | 413 | if (unlikely(status & SPU_STATUS_SINGLE_STEP)) |
414 | && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) { | 414 | ret = -ERESTARTSYS; |
415 | |||
416 | else if (unlikely((status & SPU_STATUS_STOPPED_BY_STOP) | ||
417 | && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff)) { | ||
415 | force_sig(SIGTRAP, current); | 418 | force_sig(SIGTRAP, current); |
416 | ret = -ERESTARTSYS; | 419 | ret = -ERESTARTSYS; |
417 | } | 420 | } |