forked from Minki/linux
ff8a8f2597
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>
25 lines
658 B
C
25 lines
658 B
C
#ifndef __ASM_POWERPC_XMON_H
|
|
#define __ASM_POWERPC_XMON_H
|
|
|
|
/*
|
|
* Copyrignt (C) 2006 IBM Corp
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
#ifdef CONFIG_XMON
|
|
extern void xmon_setup(void);
|
|
extern void xmon_register_spus(struct list_head *list);
|
|
#else
|
|
static inline void xmon_setup(void) { };
|
|
static inline void xmon_register_spus(struct list_head *list) { };
|
|
#endif
|
|
|
|
#endif /* __KERNEL __ */
|
|
#endif /* __ASM_POWERPC_XMON_H */
|