[Cbe-oss-dev] [PATCH 2/6] cell: add vicinity information on spus

Andre Detsch adetsch at br.ibm.com
Mon Feb 12 12:11:55 EST 2007


Subject: cell: add vicinity information on spus
From: Andre Detsch <adetsch at br.ibm.com>

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 at br.ibm.com>


Index: linux-2.6.20/arch/powerpc/platforms/cell/spu_base.c
===================================================================
--- linux-2.6.20.orig/arch/powerpc/platforms/cell/spu_base.c
+++ linux-2.6.20/arch/powerpc/platforms/cell/spu_base.c
@@ -623,6 +623,9 @@ static int __init create_spu(void *data)
 	list_add(&spu->full_list, &spu_full_list);
 	mutex_unlock(&spu_mutex);
 
+	INIT_LIST_HEAD(&spu->aff_list);
+	spu->devnode = (struct device_node *)data;
+
 	goto out;
 
 out_free_irqs:
Index: linux-2.6.20/include/asm-powerpc/spu.h
===================================================================
--- linux-2.6.20.orig/include/asm-powerpc/spu.h
+++ linux-2.6.20/include/asm-powerpc/spu.h
@@ -144,6 +144,10 @@ struct spu {
 
 	void* pdata; /* platform private data */
 	struct sys_device sysdev;
+
+	int has_mem_affinity;
+	struct device_node *devnode;
+	struct list_head aff_list;
 };
 
 struct be_spu_info {

--
Andre Detsch



More information about the cbe-oss-dev mailing list