Displaying 2 results from an estimated 2 matches for "free_list_lock".
2010 Feb 09
2
[PATCH 1/3] Introduce nouveau_bo_wait for waiting on a BO with a GPU channel (v2)
Changes in v2:
- Addressed review comments
nouveau_bo_wait will make the GPU channel wait for fence if possible,
otherwise falling back to waiting with the CPU using ttm_bo_wait.
The nouveau_fence_sync function currently returns -ENOSYS, and is
the focus of the next patch.
Signed-off-by: Luca Barbieri <luca at luca-barbieri.com>
---
drivers/gpu/drm/nouveau/nouveau_bo.c | 68
2007 Jan 02
0
[PATCH 1/4] add scsi-target and IO_CMD_EPOLL_WAIT patches
...urn cmd;
+-}
++}
+ EXPORT_SYMBOL(scsi_get_command);
+
++void __scsi_put_command(struct Scsi_Host *shost, struct scsi_cmnd *cmd,
++ struct device *dev)
++{
++ unsigned long flags;
++
++ /* changing locks here, don''t need to restore the irq state */
++ spin_lock_irqsave(&shost->free_list_lock, flags);
++ if (unlikely(list_empty(&shost->free_list))) {
++ list_add(&cmd->list, &shost->free_list);
++ cmd = NULL;
++ }
++ spin_unlock_irqrestore(&shost->free_list_lock, flags);
++
++ if (likely(cmd != NULL))
++ kmem_cache_free(shost->cmd_pool->slab, cmd);
++...