Lines Matching refs:switch_log
2289 return (ctx->switch_log->head - ctx->switch_log->tail) % in spufs_switch_log_used()
2307 if (ctx->switch_log) { in spufs_switch_log_open()
2312 ctx->switch_log = kmalloc(struct_size(ctx->switch_log, log, in spufs_switch_log_open()
2315 if (!ctx->switch_log) { in spufs_switch_log_open()
2320 ctx->switch_log->head = ctx->switch_log->tail = 0; in spufs_switch_log_open()
2321 init_waitqueue_head(&ctx->switch_log->wait); in spufs_switch_log_open()
2338 kfree(ctx->switch_log); in spufs_switch_log_release()
2339 ctx->switch_log = NULL; in spufs_switch_log_release()
2349 p = ctx->switch_log->log + ctx->switch_log->tail % SWITCH_LOG_BUFSIZE; in switch_log_sprint()
2394 error = spufs_wait(ctx->switch_log->wait, in spufs_switch_log_read()
2412 ctx->switch_log->tail = in spufs_switch_log_read()
2413 (ctx->switch_log->tail + 1) % in spufs_switch_log_read()
2438 poll_wait(file, &ctx->switch_log->wait, wait); in spufs_switch_log_poll()
2468 if (!ctx->switch_log) in spu_switch_log_notify()
2474 p = ctx->switch_log->log + ctx->switch_log->head; in spu_switch_log_notify()
2481 ctx->switch_log->head = in spu_switch_log_notify()
2482 (ctx->switch_log->head + 1) % SWITCH_LOG_BUFSIZE; in spu_switch_log_notify()
2485 wake_up(&ctx->switch_log->wait); in spu_switch_log_notify()