提交 60cf54db 编写于 作者: J Jeremy Kerr 提交者: Paul Mackerras

[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: NJeremy Kerr <jk@ozlabs.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 038200cf
...@@ -410,8 +410,11 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event) ...@@ -410,8 +410,11 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
* since we have TIF_SINGLESTEP set, thus the kernel will do * since we have TIF_SINGLESTEP set, thus the kernel will do
* it upon return from the syscall anyawy * it upon return from the syscall anyawy
*/ */
if ((status & SPU_STATUS_STOPPED_BY_STOP) if (unlikely(status & SPU_STATUS_SINGLE_STEP))
&& (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) { ret = -ERESTARTSYS;
else if (unlikely((status & SPU_STATUS_STOPPED_BY_STOP)
&& (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff)) {
force_sig(SIGTRAP, current); force_sig(SIGTRAP, current);
ret = -ERESTARTSYS; ret = -ERESTARTSYS;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册