blob: 8ae8ef9dfc22dd5a73bfba0899ddffa7d375b693 [file] [log] [blame]
Arnd Bergmann67207b92005-11-15 15:53:48 -05001/*
2 * SPU file system
3 *
4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005
5 *
6 * Author: Arnd Bergmann <arndb@de.ibm.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22#ifndef SPUFS_H
23#define SPUFS_H
24
25#include <linux/kref.h>
Christoph Hellwig650f8b02007-02-13 21:36:50 +010026#include <linux/mutex.h>
Arnd Bergmann67207b92005-11-15 15:53:48 -050027#include <linux/spinlock.h>
28#include <linux/fs.h>
Christoph Hellwigea1ae592007-06-29 10:57:56 +100029#include <linux/cpumask.h>
Arnd Bergmann67207b92005-11-15 15:53:48 -050030
31#include <asm/spu.h>
Mark Nutter5473af02005-11-15 15:53:49 -050032#include <asm/spu_csa.h>
Dwayne Grant McConnellb9e3bd72006-11-20 18:44:58 +010033#include <asm/spu_info.h>
Arnd Bergmann67207b92005-11-15 15:53:48 -050034
Jeremy Kerr87ff6092008-07-01 10:22:50 +100035#define SPUFS_PS_MAP_SIZE 0x20000
36#define SPUFS_MFC_MAP_SIZE 0x1000
37#define SPUFS_CNTL_MAP_SIZE 0x1000
38#define SPUFS_CNTL_MAP_SIZE 0x1000
39#define SPUFS_SIGNAL_MAP_SIZE PAGE_SIZE
40#define SPUFS_MSS_MAP_SIZE 0x1000
41
Arnd Bergmann67207b92005-11-15 15:53:48 -050042/* The magic number for our file system */
43enum {
44 SPUFS_MAGIC = 0x23c9b64e,
45};
46
Arnd Bergmann8b3d6662005-11-15 15:53:52 -050047struct spu_context_ops;
Arnd Bergmann62632032006-10-04 17:26:15 +020048struct spu_gang;
49
Bob Nelson36aaccc2007-07-20 21:39:52 +020050/* ctx->sched_flags */
51enum {
52 SPU_SCHED_NOTIFY_ACTIVE,
Christoph Hellwigb2c863b2007-07-23 18:43:53 -070053 SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */
Jeremy Kerrce7c1912008-03-04 20:17:02 +110054 SPU_SCHED_SPU_RUN, /* context is within spu_run */
Bob Nelson36aaccc2007-07-20 21:39:52 +020055};
56
Christoph Hellwig5158e9b2008-04-29 17:08:38 +100057enum {
58 SWITCH_LOG_BUFSIZE = 4096,
59};
60
61enum {
62 SWITCH_LOG_START,
63 SWITCH_LOG_STOP,
64 SWITCH_LOG_EXIT,
65};
66
67struct switch_log {
68 spinlock_t lock;
69 wait_queue_head_t wait;
70 unsigned long head;
71 unsigned long tail;
72 struct switch_log_entry {
73 struct timespec tstamp;
74 s32 spu_id;
75 u32 type;
76 u32 val;
77 u64 timebase;
78 } log[];
79};
80
Arnd Bergmann67207b92005-11-15 15:53:48 -050081struct spu_context {
82 struct spu *spu; /* pointer to a physical SPU */
Mark Nutter5473af02005-11-15 15:53:49 -050083 struct spu_state csa; /* SPU context save area. */
Arnd Bergmann67207b92005-11-15 15:53:48 -050084 spinlock_t mmio_lock; /* protects mmio access */
Mark Nutter6df10a82006-03-23 00:00:12 +010085 struct address_space *local_store; /* local store mapping. */
86 struct address_space *mfc; /* 'mfc' area mappings. */
Christoph Hellwig43c2bbd2007-04-23 21:08:07 +020087 struct address_space *cntl; /* 'control' area mappings. */
88 struct address_space *signal1; /* 'signal1' area mappings. */
89 struct address_space *signal2; /* 'signal2' area mappings. */
90 struct address_space *mss; /* 'mss' area mappings. */
91 struct address_space *psmap; /* 'psmap' area mappings. */
Christoph Hellwig47d3a5f2007-06-04 23:26:51 +100092 struct mutex mapping_lock;
Arnd Bergmann86767272006-10-04 17:26:21 +020093 u64 object_id; /* user space pointer for oprofile */
Arnd Bergmann8b3d6662005-11-15 15:53:52 -050094
95 enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state;
Christoph Hellwig650f8b02007-02-13 21:36:50 +010096 struct mutex state_mutex;
Christoph Hellwige45d48a32007-04-23 21:08:17 +020097 struct mutex run_mutex;
Arnd Bergmann8b3d6662005-11-15 15:53:52 -050098
99 struct mm_struct *owner;
Arnd Bergmann67207b92005-11-15 15:53:48 -0500100
101 struct kref kref;
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500102 wait_queue_head_t ibox_wq;
103 wait_queue_head_t wbox_wq;
Arnd Bergmann51104592005-12-05 22:52:25 -0500104 wait_queue_head_t stop_wq;
Arnd Bergmanna33a7d72006-03-23 00:00:11 +0100105 wait_queue_head_t mfc_wq;
Arnd Bergmann33bfd7a2007-12-20 16:39:59 +0900106 wait_queue_head_t run_wq;
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500107 struct fasync_struct *ibox_fasync;
108 struct fasync_struct *wbox_fasync;
Arnd Bergmanna33a7d72006-03-23 00:00:11 +0100109 struct fasync_struct *mfc_fasync;
110 u32 tagwait;
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500111 struct spu_context_ops *ops;
Arnd Bergmann2a911f02005-12-05 22:52:26 -0500112 struct work_struct reap_work;
Arnd Bergmann9add11d2006-10-04 17:26:14 +0200113 unsigned long flags;
114 unsigned long event_return;
Arnd Bergmann62632032006-10-04 17:26:15 +0200115
116 struct list_head gang_list;
117 struct spu_gang *gang;
Bob Nelson14748552007-07-20 21:39:53 +0200118 struct kref *prof_priv_kref;
119 void ( * prof_priv_release) (struct kref *kref);
Christoph Hellwig83899982007-02-13 21:54:22 +0100120
Christoph Hellwig476273a2007-06-29 10:58:01 +1000121 /* owner thread */
122 pid_t tid;
123
Christoph Hellwig83899982007-02-13 21:54:22 +0100124 /* scheduler fields */
Jeremy Kerr70225432007-06-29 10:58:00 +1000125 struct list_head rq;
Christoph Hellwig37901802007-06-29 10:57:51 +1000126 unsigned int time_slice;
Christoph Hellwig26bec672007-02-13 21:54:24 +0100127 unsigned long sched_flags;
Christoph Hellwigea1ae592007-06-29 10:57:56 +1000128 cpumask_t cpus_allowed;
Christoph Hellwig2eb1b122007-02-13 21:54:29 +0100129 int policy;
Christoph Hellwig83899982007-02-13 21:54:22 +0100130 int prio;
Luke Browning7a214202008-04-28 14:32:34 +1000131 int last_ran;
Christoph Hellwige9f8a0b2007-06-29 10:58:03 +1000132
133 /* statistics */
134 struct {
135 /* updates protected by ctx->state_mutex */
Andre Detsch27ec41d2007-07-20 21:39:33 +0200136 enum spu_utilization_state util_state;
137 unsigned long long tstamp; /* time of last state switch */
138 unsigned long long times[SPU_UTIL_MAX];
Christoph Hellwige9f8a0b2007-06-29 10:58:03 +1000139 unsigned long long vol_ctx_switch;
140 unsigned long long invol_ctx_switch;
141 unsigned long long min_flt;
142 unsigned long long maj_flt;
143 unsigned long long hash_flt;
144 unsigned long long slb_flt;
145 unsigned long long slb_flt_base; /* # at last ctx switch */
146 unsigned long long class2_intr;
147 unsigned long long class2_intr_base; /* # at last ctx switch */
148 unsigned long long libassist;
149 } stats;
Arnd Bergmann8e68e2f2007-07-20 21:39:47 +0200150
Christoph Hellwig5158e9b2008-04-29 17:08:38 +1000151 /* context switch log */
152 struct switch_log *switch_log;
153
Arnd Bergmann8e68e2f2007-07-20 21:39:47 +0200154 struct list_head aff_list;
155 int aff_head;
Arnd Bergmannc5fc8d22007-07-20 21:39:48 +0200156 int aff_offset;
Arnd Bergmann62632032006-10-04 17:26:15 +0200157};
158
159struct spu_gang {
160 struct list_head list;
161 struct mutex mutex;
162 struct kref kref;
163 int contexts;
Arnd Bergmann8e68e2f2007-07-20 21:39:47 +0200164
165 struct spu_context *aff_ref_ctx;
166 struct list_head aff_list_head;
167 struct mutex aff_mutex;
168 int aff_flags;
Arnd Bergmannc5fc8d22007-07-20 21:39:48 +0200169 struct spu *aff_ref_spu;
170 atomic_t aff_sched_count;
Arnd Bergmann67207b92005-11-15 15:53:48 -0500171};
172
Arnd Bergmann8e68e2f2007-07-20 21:39:47 +0200173/* Flag bits for spu_gang aff_flags */
174#define AFF_OFFSETS_SET 1
175#define AFF_MERGED 2
176
Arnd Bergmanna33a7d72006-03-23 00:00:11 +0100177struct mfc_dma_command {
178 int32_t pad; /* reserved */
179 uint32_t lsa; /* local storage address */
180 uint64_t ea; /* effective address */
181 uint16_t size; /* transfer size */
182 uint16_t tag; /* command tag */
183 uint16_t class; /* class ID */
184 uint16_t cmd; /* command opcode */
185};
186
187
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500188/* SPU context query/set operations. */
189struct spu_context_ops {
190 int (*mbox_read) (struct spu_context * ctx, u32 * data);
191 u32(*mbox_stat_read) (struct spu_context * ctx);
Arnd Bergmann3a843d72005-12-05 22:52:27 -0500192 unsigned int (*mbox_stat_poll)(struct spu_context *ctx,
193 unsigned int events);
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500194 int (*ibox_read) (struct spu_context * ctx, u32 * data);
195 int (*wbox_write) (struct spu_context * ctx, u32 data);
196 u32(*signal1_read) (struct spu_context * ctx);
197 void (*signal1_write) (struct spu_context * ctx, u32 data);
198 u32(*signal2_read) (struct spu_context * ctx);
199 void (*signal2_write) (struct spu_context * ctx, u32 data);
200 void (*signal1_type_set) (struct spu_context * ctx, u64 val);
201 u64(*signal1_type_get) (struct spu_context * ctx);
202 void (*signal2_type_set) (struct spu_context * ctx, u64 val);
203 u64(*signal2_type_get) (struct spu_context * ctx);
204 u32(*npc_read) (struct spu_context * ctx);
205 void (*npc_write) (struct spu_context * ctx, u32 data);
206 u32(*status_read) (struct spu_context * ctx);
207 char*(*get_ls) (struct spu_context * ctx);
Luke Browningcc210b32007-12-20 16:39:59 +0900208 void (*privcntl_write) (struct spu_context *ctx, u64 data);
Jeremy Kerr3960c262006-11-20 18:45:09 +0100209 u32 (*runcntl_read) (struct spu_context * ctx);
Arnd Bergmann51104592005-12-05 22:52:25 -0500210 void (*runcntl_write) (struct spu_context * ctx, u32 data);
Masato Noguchic25620d2007-12-05 13:49:31 +1100211 void (*runcntl_stop) (struct spu_context * ctx);
Arnd Bergmannee2d7342006-11-20 18:45:08 +0100212 void (*master_start) (struct spu_context * ctx);
213 void (*master_stop) (struct spu_context * ctx);
Arnd Bergmanna33a7d72006-03-23 00:00:11 +0100214 int (*set_mfc_query)(struct spu_context * ctx, u32 mask, u32 mode);
215 u32 (*read_mfc_tagstatus)(struct spu_context * ctx);
216 u32 (*get_mfc_free_elements)(struct spu_context *ctx);
Dwayne Grant McConnellb9e3bd72006-11-20 18:44:58 +0100217 int (*send_mfc_command)(struct spu_context * ctx,
218 struct mfc_dma_command * cmd);
219 void (*dma_info_read) (struct spu_context * ctx,
220 struct spu_dma_info * info);
221 void (*proxydma_info_read) (struct spu_context * ctx,
222 struct spu_proxydma_info * info);
Arnd Bergmann57dace22007-04-23 21:08:15 +0200223 void (*restart_dma)(struct spu_context *ctx);
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500224};
225
226extern struct spu_context_ops spu_hw_ops;
227extern struct spu_context_ops spu_backing_ops;
228
Arnd Bergmann67207b92005-11-15 15:53:48 -0500229struct spufs_inode_info {
230 struct spu_context *i_ctx;
Arnd Bergmann62632032006-10-04 17:26:15 +0200231 struct spu_gang *i_gang;
Arnd Bergmann67207b92005-11-15 15:53:48 -0500232 struct inode vfs_inode;
Christoph Hellwig43c2bbd2007-04-23 21:08:07 +0200233 int i_openers;
Arnd Bergmann67207b92005-11-15 15:53:48 -0500234};
235#define SPUFS_I(inode) \
236 container_of(inode, struct spufs_inode_info, vfs_inode)
237
Jeremy Kerr23d893f2008-06-30 12:17:28 +1000238struct spufs_tree_descr {
239 const char *name;
240 const struct file_operations *ops;
241 int mode;
242 size_t size;
243};
244
245extern struct spufs_tree_descr spufs_dir_contents[];
246extern struct spufs_tree_descr spufs_dir_nosched_contents[];
Jeremy Kerr2c3e4782008-07-03 11:42:20 +1000247extern struct spufs_tree_descr spufs_dir_debug_contents[];
Arnd Bergmann67207b92005-11-15 15:53:48 -0500248
249/* system call implementation */
Jeremy Kerr98f06972007-09-19 14:38:12 +1000250extern struct spufs_calls spufs_calls;
Jeremy Kerr50af32a2007-07-20 21:39:42 +0200251long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *status);
Arnd Bergmann8e68e2f2007-07-20 21:39:47 +0200252long spufs_create(struct nameidata *nd, unsigned int flags,
253 mode_t mode, struct file *filp);
Michael Ellerman48cad412007-09-19 14:38:12 +1000254/* ELF coredump callbacks for writing SPU ELF notes */
255extern int spufs_coredump_extra_notes_size(void);
Michael Ellerman7af14432007-09-19 14:38:12 +1000256extern int spufs_coredump_extra_notes_write(struct file *file, loff_t *foffset);
Michael Ellerman48cad412007-09-19 14:38:12 +1000257
Arjan van de Ven9c2e08c2007-02-12 00:55:37 -0800258extern const struct file_operations spufs_context_fops;
Arnd Bergmann67207b92005-11-15 15:53:48 -0500259
Arnd Bergmann62632032006-10-04 17:26:15 +0200260/* gang management */
261struct spu_gang *alloc_spu_gang(void);
262struct spu_gang *get_spu_gang(struct spu_gang *gang);
263int put_spu_gang(struct spu_gang *gang);
264void spu_gang_remove_ctx(struct spu_gang *gang, struct spu_context *ctx);
265void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx);
266
Arnd Bergmann57dace22007-04-23 21:08:15 +0200267/* fault handling */
268int spufs_handle_class1(struct spu_context *ctx);
Jeremy Kerrd6ad39b2007-12-20 16:39:59 +0900269int spufs_handle_class0(struct spu_context *ctx);
Arnd Bergmann57dace22007-04-23 21:08:15 +0200270
Arnd Bergmannc5fc8d22007-07-20 21:39:48 +0200271/* affinity */
272struct spu *affinity_check(struct spu_context *ctx);
273
Arnd Bergmann67207b92005-11-15 15:53:48 -0500274/* context management */
Christoph Hellwig65de66f2007-06-29 10:58:02 +1000275extern atomic_t nr_spu_contexts;
Christoph Hellwigc9101bd2007-12-20 16:39:59 +0900276static inline int __must_check spu_acquire(struct spu_context *ctx)
Christoph Hellwig6a0641e52007-02-13 21:54:21 +0100277{
Christoph Hellwigc9101bd2007-12-20 16:39:59 +0900278 return mutex_lock_interruptible(&ctx->state_mutex);
Christoph Hellwig6a0641e52007-02-13 21:54:21 +0100279}
280
281static inline void spu_release(struct spu_context *ctx)
282{
283 mutex_unlock(&ctx->state_mutex);
284}
285
Arnd Bergmann62632032006-10-04 17:26:15 +0200286struct spu_context * alloc_spu_context(struct spu_gang *gang);
Arnd Bergmann67207b92005-11-15 15:53:48 -0500287void destroy_spu_context(struct kref *kref);
288struct spu_context * get_spu_context(struct spu_context *ctx);
289int put_spu_context(struct spu_context *ctx);
Arnd Bergmann51104592005-12-05 22:52:25 -0500290void spu_unmap_mappings(struct spu_context *ctx);
Arnd Bergmann67207b92005-11-15 15:53:48 -0500291
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500292void spu_forget(struct spu_context *ctx);
Christoph Hellwigc9101bd2007-12-20 16:39:59 +0900293int __must_check spu_acquire_saved(struct spu_context *ctx);
Christoph Hellwig27b1ea02007-07-20 21:39:34 +0200294void spu_release_saved(struct spu_context *ctx);
Christoph Hellwig50b520d2007-03-10 00:05:36 +0100295
Luke Browninge65c2f62007-12-20 16:39:59 +0900296int spu_stopped(struct spu_context *ctx, u32 * stat);
297void spu_del_from_rq(struct spu_context *ctx);
Christoph Hellwig26bec672007-02-13 21:54:24 +0100298int spu_activate(struct spu_context *ctx, unsigned long flags);
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500299void spu_deactivate(struct spu_context *ctx);
300void spu_yield(struct spu_context *ctx);
Bob Nelson36aaccc2007-07-20 21:39:52 +0200301void spu_switch_notify(struct spu *spu, struct spu_context *ctx);
Christoph Hellwig5158e9b2008-04-29 17:08:38 +1000302void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx,
303 u32 type, u32 val);
Christoph Hellwigfe443ef2007-06-29 10:57:52 +1000304void spu_set_timeslice(struct spu_context *ctx);
Christoph Hellwig2cf2b3b2007-06-29 10:57:55 +1000305void spu_update_sched_info(struct spu_context *ctx);
306void __spu_update_sched_info(struct spu_context *ctx);
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500307int __init spu_sched_init(void);
Sebastian Siewiord1450312007-07-20 21:39:29 +0200308void spu_sched_exit(void);
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500309
Jeremy Kerrc6730ed2006-11-20 18:45:10 +0100310extern char *isolated_loader;
311
Arnd Bergmannce8ab852006-01-04 20:31:29 +0100312/*
313 * spufs_wait
Jeremy Kerr70225432007-06-29 10:58:00 +1000314 * Same as wait_event_interruptible(), except that here
Arnd Bergmannce8ab852006-01-04 20:31:29 +0100315 * we need to call spu_release(ctx) before sleeping, and
316 * then spu_acquire(ctx) when awoken.
Christoph Hellwigeebead52008-02-08 15:50:41 +1100317 *
318 * Returns with state_mutex re-acquired when successfull or
319 * with -ERESTARTSYS and the state_mutex dropped when interrupted.
Arnd Bergmannce8ab852006-01-04 20:31:29 +0100320 */
321
322#define spufs_wait(wq, condition) \
323({ \
324 int __ret = 0; \
325 DEFINE_WAIT(__wait); \
326 for (;;) { \
327 prepare_to_wait(&(wq), &__wait, TASK_INTERRUPTIBLE); \
328 if (condition) \
329 break; \
Christoph Hellwigeebead52008-02-08 15:50:41 +1100330 spu_release(ctx); \
Jeremy Kerrd3764392007-04-23 21:08:24 +0200331 if (signal_pending(current)) { \
332 __ret = -ERESTARTSYS; \
333 break; \
Arnd Bergmannce8ab852006-01-04 20:31:29 +0100334 } \
Jeremy Kerrd3764392007-04-23 21:08:24 +0200335 schedule(); \
Christoph Hellwigc9101bd2007-12-20 16:39:59 +0900336 __ret = spu_acquire(ctx); \
337 if (__ret) \
338 break; \
Arnd Bergmannce8ab852006-01-04 20:31:29 +0100339 } \
340 finish_wait(&(wq), &__wait); \
341 __ret; \
342})
343
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500344size_t spu_wbox_write(struct spu_context *ctx, u32 data);
345size_t spu_ibox_read(struct spu_context *ctx, u32 *data);
346
347/* irq callback funcs. */
348void spufs_ibox_callback(struct spu *spu);
349void spufs_wbox_callback(struct spu *spu);
Luke Browningf3d69e02008-04-27 18:41:55 +0000350void spufs_stop_callback(struct spu *spu, int irq);
Arnd Bergmanna33a7d72006-03-23 00:00:11 +0100351void spufs_mfc_callback(struct spu *spu);
Arnd Bergmann9add11d2006-10-04 17:26:14 +0200352void spufs_dma_callback(struct spu *spu, int type);
Arnd Bergmann8b3d6662005-11-15 15:53:52 -0500353
Dwayne Grant McConnellbf1ab972006-11-23 00:46:37 +0100354extern struct spu_coredump_calls spufs_coredump_calls;
355struct spufs_coredump_reader {
356 char *name;
357 ssize_t (*read)(struct spu_context *ctx,
358 char __user *buffer, size_t size, loff_t *pos);
Michael Ellerman74de08b2007-09-19 14:38:12 +1000359 u64 (*get)(struct spu_context *ctx);
Dwayne Grant McConnellbf1ab972006-11-23 00:46:37 +0100360 size_t size;
361};
362extern struct spufs_coredump_reader spufs_coredump_read[];
363extern int spufs_coredump_num_notes;
364
Jeremy Kerr7cd58e42007-12-20 16:39:59 +0900365extern int spu_init_csa(struct spu_state *csa);
366extern void spu_fini_csa(struct spu_state *csa);
367extern int spu_save(struct spu_state *prev, struct spu *spu);
368extern int spu_restore(struct spu_state *new, struct spu *spu);
369extern int spu_switch(struct spu_state *prev, struct spu_state *new,
370 struct spu *spu);
371extern int spu_alloc_lscsa(struct spu_state *csa);
372extern void spu_free_lscsa(struct spu_state *csa);
Andre Detsch27ec41d2007-07-20 21:39:33 +0200373
Jeremy Kerr7cd58e42007-12-20 16:39:59 +0900374extern void spuctx_switch_state(struct spu_context *ctx,
375 enum spu_utilization_state new_state);
Christoph Hellwigfe2f8962007-06-29 10:58:07 +1000376
Christoph Hellwig038200c2008-01-11 15:03:26 +1100377#define spu_context_trace(name, ctx, spu) \
Julio M. Merino Vidald6508aa2008-04-30 15:06:39 +1000378 trace_mark(name, "ctx %p spu %p", ctx, spu);
Christoph Hellwig038200c2008-01-11 15:03:26 +1100379#define spu_context_nospu_trace(name, ctx) \
Julio M. Merino Vidald6508aa2008-04-30 15:06:39 +1000380 trace_mark(name, "ctx %p", ctx);
Christoph Hellwig038200c2008-01-11 15:03:26 +1100381
Arnd Bergmann67207b92005-11-15 15:53:48 -0500382#endif