1 --- a/arch/powerpc/include/asm/spu.h 2012-03-01 01:32:49.000000000 +0100
2 +++ b/arch/powerpc/include/asm/spu.h 2012-03-05 17:49:44.083370504 +0100
5 extern struct cbe_spu_info cbe_spu_info[];
7 +extern int spu_enum_shared(void);
9 void spu_init_channels(struct spu *spu);
10 void spu_irq_setaffinity(struct spu *spu, int cpu);
12 --- a/arch/powerpc/platforms/cell/spu_base.c 2018-12-26 17:25:07.982026754 +0100
13 +++ b/arch/powerpc/platforms/cell/spu_base.c 2018-12-26 17:28:29.346588750 +0100
17 #include <asm/kexec.h>
18 +#include <linux/moduleparam.h>
20 +static int enum_shared = 0;
21 +module_param(enum_shared, int, S_IRUGO);
22 +MODULE_PARM_DESC(enum_shared, "Enumerate shared SPUs");
24 const struct spu_management_ops *spu_management_ops;
25 EXPORT_SYMBOL_GPL(spu_management_ops);
27 free_irq(spu->irqs[2], spu);
30 +int spu_enum_shared(void)
32 + return (enum_shared);
34 +EXPORT_SYMBOL_GPL(spu_enum_shared);
36 void spu_init_channels(struct spu *spu)
39 --- a/arch/powerpc/platforms/ps3/spu.c 2012-03-01 01:32:49.000000000 +0100
40 +++ b/arch/powerpc/platforms/ps3/spu.c 2012-03-05 17:54:01.800664787 +0100
45 - if (resource_type == PS3_SPU_RESOURCE_TYPE_EXCLUSIVE) {
46 + if (resource_type == PS3_SPU_RESOURCE_TYPE_EXCLUSIVE || spu_enum_shared()) {
47 result = fn((void*)(unsigned long)resource_id);