diff options
author | Andre Detsch <adetsch@br.ibm.com> | 2007-08-03 21:53:46 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-08-10 07:04:21 -0400 |
commit | f5996449e3244524cab0ba709a4bd87047a8175f (patch) | |
tree | d25520e4020d148e6595270d93ddbb5f8224d083 /include/asm-powerpc | |
parent | edd0622bd2e8f755c960827e15aa6908c3c5aa94 (diff) |
[POWERPC] cell: Move SPU affinity init to spu_management_of_ops
This patch moves affinity initialization code from spu_base.c to a
new spu_management_of_ops function (init_affinity), which is empty
in the case of PS3. This fixes a linking problem that was happening
when compiling for PS3.
Also, some small code style changes were made.
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/spu_priv1.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-powerpc/spu_priv1.h b/include/asm-powerpc/spu_priv1.h index 7e78f6a1ab8b..0f37c7c90820 100644 --- a/include/asm-powerpc/spu_priv1.h +++ b/include/asm-powerpc/spu_priv1.h | |||
@@ -178,6 +178,7 @@ struct spu_management_ops { | |||
178 | int (*enumerate_spus)(int (*fn)(void *data)); | 178 | int (*enumerate_spus)(int (*fn)(void *data)); |
179 | int (*create_spu)(struct spu *spu, void *data); | 179 | int (*create_spu)(struct spu *spu, void *data); |
180 | int (*destroy_spu)(struct spu *spu); | 180 | int (*destroy_spu)(struct spu *spu); |
181 | int (*init_affinity)(void); | ||
181 | }; | 182 | }; |
182 | 183 | ||
183 | extern const struct spu_management_ops* spu_management_ops; | 184 | extern const struct spu_management_ops* spu_management_ops; |
@@ -200,6 +201,12 @@ spu_destroy_spu (struct spu *spu) | |||
200 | return spu_management_ops->destroy_spu(spu); | 201 | return spu_management_ops->destroy_spu(spu); |
201 | } | 202 | } |
202 | 203 | ||
204 | static inline int | ||
205 | spu_init_affinity (void) | ||
206 | { | ||
207 | return spu_management_ops->init_affinity(); | ||
208 | } | ||
209 | |||
203 | /* | 210 | /* |
204 | * The declarations folowing are put here for convenience | 211 | * The declarations folowing are put here for convenience |
205 | * and only intended to be used by the platform setup code. | 212 | * and only intended to be used by the platform setup code. |