]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[CELL] cell: add vicinity information on spus
authorArnd Bergmann <arnd@arndb.de>
Fri, 20 Jul 2007 19:39:45 +0000 (21:39 +0200)
committerArnd Bergmann <arnd@klappe.arndb.de>
Fri, 20 Jul 2007 19:42:12 +0000 (21:42 +0200)
This patch adds affinity data to each spu instance.
A doubly linked list is created, meant to connect the spus
in the physical order they are placed in the BE. SPUs
near to memory should be marked as having memory affinity.
Adjustments of the fields acording to FW properties is done
in separate patches, one for CPBW, one for Malta (patch for
Malta under testing).

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
arch/powerpc/platforms/cell/spu_base.c
include/asm-powerpc/spu.h

index dd632e5feff34f342a2ff69eecdfc6e798cc18da..0fc2e12a3c85c10a2d69f7223d7a826077d9ad79 100644 (file)
@@ -593,6 +593,8 @@ static int __init create_spu(void *data)
        ktime_get_ts(&ts);
        spu->stats.tstamp = timespec_to_ns(&ts);
 
+       INIT_LIST_HEAD(&spu->aff_list);
+
        goto out;
 
 out_free_irqs:
index 2f2fe9f1c097ec5f369a140842312de9712d5c8b..18e558bef98ef4b1870f7f3559f1dc5afb954d6e 100644 (file)
@@ -166,6 +166,9 @@ struct spu {
 
        struct sys_device sysdev;
 
+       int has_mem_affinity;
+       struct list_head aff_list;
+
        struct {
                /* protected by interrupt reentrancy */
                enum spu_utilization_state util_state;