diff options
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/spufs.h')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/spufs.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index cdc515182f82..dd63b16bb072 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h | |||
@@ -47,6 +47,30 @@ enum { | |||
47 | SPU_SCHED_SPU_RUN, /* context is within spu_run */ | 47 | SPU_SCHED_SPU_RUN, /* context is within spu_run */ |
48 | }; | 48 | }; |
49 | 49 | ||
50 | enum { | ||
51 | SWITCH_LOG_BUFSIZE = 4096, | ||
52 | }; | ||
53 | |||
54 | enum { | ||
55 | SWITCH_LOG_START, | ||
56 | SWITCH_LOG_STOP, | ||
57 | SWITCH_LOG_EXIT, | ||
58 | }; | ||
59 | |||
60 | struct switch_log { | ||
61 | spinlock_t lock; | ||
62 | wait_queue_head_t wait; | ||
63 | unsigned long head; | ||
64 | unsigned long tail; | ||
65 | struct switch_log_entry { | ||
66 | struct timespec tstamp; | ||
67 | s32 spu_id; | ||
68 | u32 type; | ||
69 | u32 val; | ||
70 | u64 timebase; | ||
71 | } log[]; | ||
72 | }; | ||
73 | |||
50 | struct spu_context { | 74 | struct spu_context { |
51 | struct spu *spu; /* pointer to a physical SPU */ | 75 | struct spu *spu; /* pointer to a physical SPU */ |
52 | struct spu_state csa; /* SPU context save area. */ | 76 | struct spu_state csa; /* SPU context save area. */ |
@@ -116,6 +140,9 @@ struct spu_context { | |||
116 | unsigned long long libassist; | 140 | unsigned long long libassist; |
117 | } stats; | 141 | } stats; |
118 | 142 | ||
143 | /* context switch log */ | ||
144 | struct switch_log *switch_log; | ||
145 | |||
119 | struct list_head aff_list; | 146 | struct list_head aff_list; |
120 | int aff_head; | 147 | int aff_head; |
121 | int aff_offset; | 148 | int aff_offset; |
@@ -256,6 +283,8 @@ int spu_activate(struct spu_context *ctx, unsigned long flags); | |||
256 | void spu_deactivate(struct spu_context *ctx); | 283 | void spu_deactivate(struct spu_context *ctx); |
257 | void spu_yield(struct spu_context *ctx); | 284 | void spu_yield(struct spu_context *ctx); |
258 | void spu_switch_notify(struct spu *spu, struct spu_context *ctx); | 285 | void spu_switch_notify(struct spu *spu, struct spu_context *ctx); |
286 | void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx, | ||
287 | u32 type, u32 val); | ||
259 | void spu_set_timeslice(struct spu_context *ctx); | 288 | void spu_set_timeslice(struct spu_context *ctx); |
260 | void spu_update_sched_info(struct spu_context *ctx); | 289 | void spu_update_sched_info(struct spu_context *ctx); |
261 | void __spu_update_sched_info(struct spu_context *ctx); | 290 | void __spu_update_sched_info(struct spu_context *ctx); |