aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/oprofile_impl.h10
-rw-r--r--include/asm-powerpc/spu.h15
2 files changed, 21 insertions, 4 deletions
diff --git a/include/asm-powerpc/oprofile_impl.h b/include/asm-powerpc/oprofile_impl.h
index 8d6b47f7b300..938fefb4c4bc 100644
--- a/include/asm-powerpc/oprofile_impl.h
+++ b/include/asm-powerpc/oprofile_impl.h
@@ -39,14 +39,16 @@ struct op_system_config {
39 39
40/* Per-arch configuration */ 40/* Per-arch configuration */
41struct op_powerpc_model { 41struct op_powerpc_model {
42 void (*reg_setup) (struct op_counter_config *, 42 int (*reg_setup) (struct op_counter_config *,
43 struct op_system_config *, 43 struct op_system_config *,
44 int num_counters); 44 int num_counters);
45 void (*cpu_setup) (struct op_counter_config *); 45 int (*cpu_setup) (struct op_counter_config *);
46 void (*start) (struct op_counter_config *); 46 int (*start) (struct op_counter_config *);
47 void (*global_start) (struct op_counter_config *); 47 int (*global_start) (struct op_counter_config *);
48 void (*stop) (void); 48 void (*stop) (void);
49 void (*global_stop) (void); 49 void (*global_stop) (void);
50 int (*sync_start)(void);
51 int (*sync_stop)(void);
50 void (*handle_interrupt) (struct pt_regs *, 52 void (*handle_interrupt) (struct pt_regs *,
51 struct op_counter_config *); 53 struct op_counter_config *);
52 int num_counters; 54 int num_counters;
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index 24f352da2869..a0f7fc8e23bb 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -138,6 +138,7 @@ struct spu {
138 struct spu_runqueue *rq; 138 struct spu_runqueue *rq;
139 unsigned long long timestamp; 139 unsigned long long timestamp;
140 pid_t pid; 140 pid_t pid;
141 pid_t tgid;
141 int class_0_pending; 142 int class_0_pending;
142 spinlock_t register_lock; 143 spinlock_t register_lock;
143 144
@@ -217,6 +218,20 @@ extern void spu_associate_mm(struct spu *spu, struct mm_struct *mm);
217struct mm_struct; 218struct mm_struct;
218extern void spu_flush_all_slbs(struct mm_struct *mm); 219extern void spu_flush_all_slbs(struct mm_struct *mm);
219 220
221/* This interface allows a profiler (e.g., OProfile) to store a ref
222 * to spu context information that it creates. This caching technique
223 * avoids the need to recreate this information after a save/restore operation.
224 *
225 * Assumes the caller has already incremented the ref count to
226 * profile_info; then spu_context_destroy must call kref_put
227 * on prof_info_kref.
228 */
229void spu_set_profile_private_kref(struct spu_context *ctx,
230 struct kref *prof_info_kref,
231 void ( * prof_info_release) (struct kref *kref));
232
233void *spu_get_profile_private_kref(struct spu_context *ctx);
234
220/* system callbacks from the SPU */ 235/* system callbacks from the SPU */
221struct spu_syscall_block { 236struct spu_syscall_block {
222 u64 nr_ret; 237 u64 nr_ret;