From: Takashi Yamamoto Date: Thu, 27 Mar 2008 00:37:38 +0000 (+1100) Subject: [POWERPC] PS3: Add ps3_get_speid routine X-Git-Tag: v2.6.26-rc1~1125^2~100 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23afcb4e0061c591776a3350db89512d085397c2;p=linux-2.6 [POWERPC] PS3: Add ps3_get_speid routine 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 Signed-off-by: Geoff Levand Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c index 5ad41189b4..d135cef9ed 100644 --- a/arch/powerpc/platforms/ps3/spu.c +++ b/arch/powerpc/platforms/ps3/spu.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "../cell/spufs/spufs.h" #include "platform.h" @@ -140,6 +141,12 @@ static void _dump_areas(unsigned int spe_id, unsigned long priv2, 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;