[patch 2/6] PS3: Add ps3_get_speid routine

Geoff Levand geoffrey.levand at am.sony.com
Thu Mar 27 11:37:38 EST 2008


From: Takashi Yamamoto <TakashiA.Yamamoto at jp.sony.com>

Add a new routine ps3_get_speid() which returns the logical
SPE ID.  This ID is needed for profiling support.

Signed-off-by: Takashi Yamamoto <TakashiA.Yamamoto at jp.sony.com>
Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>
---
 arch/powerpc/platforms/ps3/spu.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -27,6 +27,7 @@
 #include <asm/spu.h>
 #include <asm/spu_priv1.h>
 #include <asm/lv1call.h>
+#include <asm/ps3.h>
 
 #include "../cell/spufs/spufs.h"
 #include "platform.h"
@@ -140,6 +141,12 @@ static void _dump_areas(unsigned int spe
 	pr_debug("%s:%d: shadow:  %lxh\n", func, line, shadow);
 }
 
+inline u64 ps3_get_spe_id(void *arg)
+{
+	return spu_pdata(arg)->spe_id;
+}
+EXPORT_SYMBOL_GPL(ps3_get_spe_id);
+
 static unsigned long get_vas_id(void)
 {
 	unsigned long id;

-- 






More information about the Linuxppc-dev mailing list