* updated kollision (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / architecture / powerpc64 / package / linux / 0090-spu-enum-shared-param.patch
blob7e20c26a959145c4cfda087b5de18adeded0f5ee
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
3 @@ -198,6 +198,8 @@
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
14 @@ -39,6 +39,11 @@
15 #include <asm/xmon.h>
16 #include <asm/prom.h>
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);
26 @@ -450,6 +455,12 @@
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)
38 static const struct {
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
41 @@ -421,7 +421,7 @@
42 if (result)
43 break;
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);
49 if (result)