aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2007-07-20 15:39:44 -0400
committerArnd Bergmann <arnd@klappe.arndb.de>2007-07-20 15:42:11 -0400
commitaa6d5b20254a21b69092dd839b70ee148303ef25 (patch)
tree0519330e2e4eb6360866dbf2104ed987e4bdd2c0 /include/asm-powerpc
parent7e90b74967ea54dbd6eb539e1cb151ec37f63d7f (diff)
[CELL] cell: add per BE structure with info about its SPUs
Addition of a spufs-global "cbe_info" array. Each entry contains information about one Cell/B.E. node, namelly: * list of spus (both free and busy spus are in this list); * list of free spus (replacing the static spu_list from spu_base.c) * number of spus; * number of reserved (non scheduleable) spus. SPE affinity implementation actually requires only access to one spu per BE node (since it implements its own pointer to walk through the other spus of the ring) and the number of scheduleable spus (n_spus - non_sched_spus) However having this more general structure can be useful for other functionalities, concentrating per-cbe statistics / data. Signed-off-by: Andre Detsch <adetsch@br.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/spu.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index 12442acdc76f..2f2fe9f1c097 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -122,6 +122,7 @@ struct spu {
122 struct spu_problem __iomem *problem; 122 struct spu_problem __iomem *problem;
123 struct spu_priv2 __iomem *priv2; 123 struct spu_priv2 __iomem *priv2;
124 struct list_head list; 124 struct list_head list;
125 struct list_head cbe_list;
125 struct list_head sched_list; 126 struct list_head sched_list;
126 struct list_head full_list; 127 struct list_head full_list;
127 int number; 128 int number;
@@ -181,6 +182,15 @@ struct spu {
181 } stats; 182 } stats;
182}; 183};
183 184
185struct cbe_spu_info {
186 struct list_head spus;
187 struct list_head free_spus;
188 int n_spus;
189 atomic_t reserved_spus;
190};
191
192extern struct cbe_spu_info cbe_spu_info[];
193
184struct spu *spu_alloc(void); 194struct spu *spu_alloc(void);
185struct spu *spu_alloc_node(int node); 195struct spu *spu_alloc_node(int node);
186void spu_free(struct spu *spu); 196void spu_free(struct spu *spu);