diff options
Diffstat (limited to 'include/asm-powerpc/spu.h')
-rw-r--r-- | include/asm-powerpc/spu.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index 31d5054be20f..eedc828cef2d 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -106,6 +106,14 @@ struct spu_context; | |||
106 | struct spu_runqueue; | 106 | struct spu_runqueue; |
107 | struct device_node; | 107 | struct device_node; |
108 | 108 | ||
109 | enum spu_utilization_state { | ||
110 | SPU_UTIL_SYSTEM, | ||
111 | SPU_UTIL_USER, | ||
112 | SPU_UTIL_IOWAIT, | ||
113 | SPU_UTIL_IDLE, | ||
114 | SPU_UTIL_MAX | ||
115 | }; | ||
116 | |||
109 | struct spu { | 117 | struct spu { |
110 | const char *name; | 118 | const char *name; |
111 | unsigned long local_store_phys; | 119 | unsigned long local_store_phys; |
@@ -156,6 +164,21 @@ struct spu { | |||
156 | u64 shadow_int_mask_RW[3]; | 164 | u64 shadow_int_mask_RW[3]; |
157 | 165 | ||
158 | struct sys_device sysdev; | 166 | struct sys_device sysdev; |
167 | |||
168 | struct { | ||
169 | /* protected by interrupt reentrancy */ | ||
170 | enum spu_utilization_state utilization_state; | ||
171 | unsigned long tstamp; /* time of last ctx switch */ | ||
172 | unsigned long times[SPU_UTIL_MAX]; | ||
173 | unsigned long long vol_ctx_switch; | ||
174 | unsigned long long invol_ctx_switch; | ||
175 | unsigned long long min_flt; | ||
176 | unsigned long long maj_flt; | ||
177 | unsigned long long hash_flt; | ||
178 | unsigned long long slb_flt; | ||
179 | unsigned long long class2_intr; | ||
180 | unsigned long long libassist; | ||
181 | } stats; | ||
159 | }; | 182 | }; |
160 | 183 | ||
161 | struct spu *spu_alloc(void); | 184 | struct spu *spu_alloc(void); |
@@ -448,6 +471,7 @@ struct spu_priv1 { | |||
448 | #define MFC_STATE1_PROBLEM_STATE_MASK 0x08ull | 471 | #define MFC_STATE1_PROBLEM_STATE_MASK 0x08ull |
449 | #define MFC_STATE1_RELOCATE_MASK 0x10ull | 472 | #define MFC_STATE1_RELOCATE_MASK 0x10ull |
450 | #define MFC_STATE1_MASTER_RUN_CONTROL_MASK 0x20ull | 473 | #define MFC_STATE1_MASTER_RUN_CONTROL_MASK 0x20ull |
474 | #define MFC_STATE1_TABLE_SEARCH_MASK 0x40ull | ||
451 | u64 mfc_lpid_RW; /* 0x008 */ | 475 | u64 mfc_lpid_RW; /* 0x008 */ |
452 | u64 spu_idr_RW; /* 0x010 */ | 476 | u64 spu_idr_RW; /* 0x010 */ |
453 | u64 mfc_vr_RO; /* 0x018 */ | 477 | u64 mfc_vr_RO; /* 0x018 */ |