20 #if !defined(_SPU_PRIV1_H)
22 #if defined(__KERNEL__)
24 #include <linux/types.h>
32 void (*int_mask_and) (
struct spu *spu,
int class,
u64 mask);
33 void (*int_mask_or) (
struct spu *spu,
int class,
u64 mask);
34 void (*int_mask_set) (
struct spu *spu,
int class,
u64 mask);
35 u64 (*int_mask_get) (
struct spu *spu,
int class);
36 void (*int_stat_clear) (
struct spu *spu,
int class,
u64 stat);
37 u64 (*int_stat_get) (
struct spu *spu,
int class);
39 u64 (*mfc_dar_get) (
struct spu *spu);
40 u64 (*mfc_dsisr_get) (
struct spu *spu);
41 void (*mfc_dsisr_set) (
struct spu *spu,
u64 dsisr);
42 void (*mfc_sdr_setup) (
struct spu *spu);
43 void (*mfc_sr1_set) (
struct spu *spu,
u64 sr1);
44 u64 (*mfc_sr1_get) (
struct spu *spu);
45 void (*mfc_tclass_id_set) (
struct spu *spu,
u64 tclass_id);
46 u64 (*mfc_tclass_id_get) (
struct spu *spu);
47 void (*tlb_invalidate) (
struct spu *spu);
48 void (*resource_allocation_groupID_set) (
struct spu *spu,
u64 id);
49 u64 (*resource_allocation_groupID_get) (
struct spu *spu);
50 void (*resource_allocation_enable_set) (
struct spu *spu,
u64 enable);
51 u64 (*resource_allocation_enable_get) (
struct spu *spu);
57 spu_int_mask_and (
struct spu *spu,
int class,
u64 mask)
59 spu_priv1_ops->int_mask_and(spu,
class, mask);
63 spu_int_mask_or (
struct spu *spu,
int class,
u64 mask)
65 spu_priv1_ops->int_mask_or(spu,
class, mask);
69 spu_int_mask_set (
struct spu *spu,
int class,
u64 mask)
71 spu_priv1_ops->int_mask_set(spu,
class, mask);
75 spu_int_mask_get (
struct spu *spu,
int class)
77 return spu_priv1_ops->int_mask_get(spu,
class);
81 spu_int_stat_clear (
struct spu *spu,
int class,
u64 stat)
83 spu_priv1_ops->int_stat_clear(spu,
class, stat);
87 spu_int_stat_get (
struct spu *spu,
int class)
89 return spu_priv1_ops->int_stat_get (spu,
class);
93 spu_cpu_affinity_set (
struct spu *spu,
int cpu)
95 spu_priv1_ops->cpu_affinity_set(spu, cpu);
99 spu_mfc_dar_get (
struct spu *spu)
101 return spu_priv1_ops->mfc_dar_get(spu);
105 spu_mfc_dsisr_get (
struct spu *spu)
107 return spu_priv1_ops->mfc_dsisr_get(spu);
111 spu_mfc_dsisr_set (
struct spu *spu,
u64 dsisr)
113 spu_priv1_ops->mfc_dsisr_set(spu, dsisr);
117 spu_mfc_sdr_setup (
struct spu *spu)
119 spu_priv1_ops->mfc_sdr_setup(spu);
123 spu_mfc_sr1_set (
struct spu *spu,
u64 sr1)
125 spu_priv1_ops->mfc_sr1_set(spu, sr1);
129 spu_mfc_sr1_get (
struct spu *spu)
131 return spu_priv1_ops->mfc_sr1_get(spu);
135 spu_mfc_tclass_id_set (
struct spu *spu,
u64 tclass_id)
137 spu_priv1_ops->mfc_tclass_id_set(spu, tclass_id);
141 spu_mfc_tclass_id_get (
struct spu *spu)
143 return spu_priv1_ops->mfc_tclass_id_get(spu);
147 spu_tlb_invalidate (
struct spu *spu)
149 spu_priv1_ops->tlb_invalidate(spu);
153 spu_resource_allocation_groupID_set (
struct spu *spu,
u64 id)
155 spu_priv1_ops->resource_allocation_groupID_set(spu,
id);
159 spu_resource_allocation_groupID_get (
struct spu *spu)
161 return spu_priv1_ops->resource_allocation_groupID_get(spu);
165 spu_resource_allocation_enable_set (
struct spu *spu,
u64 enable)
167 spu_priv1_ops->resource_allocation_enable_set(spu, enable);
171 spu_resource_allocation_enable_get (
struct spu *spu)
173 return spu_priv1_ops->resource_allocation_enable_get(spu);
180 int (*create_spu)(
struct spu *spu,
void *
data);
181 int (*destroy_spu)(
struct spu *spu);
190 spu_enumerate_spus (
int (*
fn)(
void *
data))
192 return spu_management_ops->enumerate_spus(
fn);
196 spu_create_spu (
struct spu *spu,
void *data)
198 return spu_management_ops->create_spu(spu, data);
202 spu_destroy_spu (
struct spu *spu)
204 return spu_management_ops->destroy_spu(spu);
208 spu_init_affinity (
void)
210 return spu_management_ops->init_affinity();
216 spu_management_ops->enable_spu(ctx);
222 spu_management_ops->disable_spu(ctx);