aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-10-24 12:31:27 -0400
committerPaul Mackerras <paulus@samba.org>2006-10-25 00:20:22 -0400
commitff8a8f25976aa58bbae7883405b00dcbaf4cc823 (patch)
tree7add339fe063a30b23e52d523ecb310e796966cf /arch/powerpc/platforms/cell
parent302eca184fb844670fb128c69e22a8a28bbce48a (diff)
[POWERPC] add support for stopping spus from xmon
This patch adds support for stopping, and restarting, spus from xmon. We use the spu master runcntl bit to stop execution, this is apparently the "right" way to control spu execution and spufs will be changed in the future to use this bit. Testing has shown that to restart execution we have to turn the master runcntl bit on and also rewrite the spu runcntl bit, even if it is already set to 1 (running). Stopping spus is triggered by the xmon command 'ss' - "spus stop" perhaps. Restarting them is triggered via 'sr'. Restart doesn't start execution on spus unless they were running prior to being stopped by xmon. Walking the spu->full_list in xmon after a panic, would mean corruption of any spu struct would make all the others inaccessible. To avoid this, and also to make the next patch easier, we cache pointers to all spus during boot. We attempt to catch and recover from errors while stopping and restarting the spus, but as with most xmon functionality there are no guarantees that performing these operations won't crash xmon itself. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell')
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index b75b091098ef..032bc923342a 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -38,6 +38,7 @@
38#include <asm/spu.h> 38#include <asm/spu.h>
39#include <asm/spu_priv1.h> 39#include <asm/spu_priv1.h>
40#include <asm/mmu_context.h> 40#include <asm/mmu_context.h>
41#include <asm/xmon.h>
41 42
42#include "interrupt.h" 43#include "interrupt.h"
43 44
@@ -943,6 +944,9 @@ static int __init init_spu_base(void)
943 break; 944 break;
944 } 945 }
945 } 946 }
947
948 xmon_register_spus(&spu_full_list);
949
946 return ret; 950 return ret;
947} 951}
948module_init(init_spu_base); 952module_init(init_spu_base);