search for: list_lock

Displaying 11 results from an estimated 11 matches for "list_lock".

Did you mean: plist_lock
2014 Dec 21
1
[PATCH 1/3] nouveau: Do not BUG_ON(!spin_is_locked()) on UP
...0644 --- a/drivers/gpu/drm/nouveau/core/core/notify.c +++ b/drivers/gpu/drm/nouveau/core/core/notify.c @@ -98,7 +98,7 @@ nvkm_notify_send(struct nvkm_notify *notify, void *data, u32 size) struct nvkm_event *event = notify->event; unsigned long flags; - BUG_ON(!spin_is_locked(&event->list_lock)); + assert_spin_locked(&event->list_lock); BUG_ON(size != notify->size); spin_lock_irqsave(&event->refs_lock, flags); -- 1.8.1.5
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...IO_ID_RPROC_SERIAL; +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,20 +352,99 @@ static inline bool use_multiport(struct ports_device *portdev) return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); } +static DEFINE_SPINLOCK(list_lock); +static LIST_HEAD(pending_free_list); + static void free_buf(struct port_buffer *buf) { - kfree(buf->buf); + unsigned long flags; + + if (!buf->dev) { + kfree(buf->buf); + goto freebuf; + } + + BUG_ON(!rproc_enabled); + + /* dma_free_coherent requires interrupts to be enabled */ + if...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...IO_ID_RPROC_SERIAL; +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,20 +352,99 @@ static inline bool use_multiport(struct ports_device *portdev) return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); } +static DEFINE_SPINLOCK(list_lock); +static LIST_HEAD(pending_free_list); + static void free_buf(struct port_buffer *buf) { - kfree(buf->buf); + unsigned long flags; + + if (!buf->dev) { + kfree(buf->buf); + goto freebuf; + } + + BUG_ON(!rproc_enabled); + + /* dma_free_coherent requires interrupts to be enabled */ + if...
2010 Jan 25
1
[PATCH] Btrfs: fix another orphan cleanup problem
...sertions(+), 0 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c7fbfaa..067f4b5 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2202,6 +2202,17 @@ void btrfs_orphan_cleanup(struct btrfs_root *root) * the proper thing when we hit it */ spin_lock(&root->list_lock); + if (!list_empty(&BTRFS_I(inode)->i_orphan)) { + /* + * This inode is on the in-memory list, which means we + * shouldn''t be cleaning it up, move on to the next + * orphan item. + */ + spin_unlock(&root->list_lock); + key.offset = inode->i_ino - 1; +...
2014 May 14
0
[RFC PATCH v1 07/16] drm/nouveau: rework to new fence interface
...er, struct nouveau_eventh **ref) void nouveau_event_trigger(struct nouveau_event *event, int index) { - struct nouveau_eventh *handler; + struct nouveau_eventh *handler, *next; unsigned long flags; if (WARN_ON(index >= event->index_nr)) return; spin_lock_irqsave(&event->list_lock, flags); - list_for_each_entry(handler, &event->index[index].list, head) { + list_for_each_entry_safe(handler, next, &event->index[index].list, head) { if (test_bit(NVKM_EVENT_ENABLE, &handler->flags) && handler->func(handler->priv, index) == NVKM_EVENT_...
2011 Mar 08
6
[PATCH v1 0/6] btrfs: scrub
This series adds an initial implementation for scrub. It works quite straightforward. The usermode issues an ioctl for each device in the fs. For each device, it enumerates the allocated device chunks. For each chunk, the contained extents are enumerated and the data checksums fetched. The extents are read sequentially and the checksums verified. If an error occurs (checksum or EIO), a good copy
2014 May 14
17
[RFC PATCH v1 00/16] Convert all ttm drivers to use the new reservation interface
This series depends on the previously posted reservation api patches. 2 of them are not yet in for-next-fences branch of git://git.linaro.org/people/sumit.semwal/linux-3.x.git The missing patches are still in my vmwgfx_wip branch at git://people.freedesktop.org/~mlankhorst/linux All ttm drivers are converted to the fence api, fence_lock is removed and rcu is used in its place. qxl is the first
2014 Jul 31
19
[PATCH 01/19] fence: add debugging lines to fence_is_signaled for the callback
fence_is_signaled callback should support being run in atomic context, but not in irq context. Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com> --- include/linux/fence.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/include/linux/fence.h b/include/linux/fence.h index d174585b874b..c1a4519ba2f5 100644 ---
2014 Jul 09
22
[PATCH 00/17] Convert TTM to the new fence interface.
This series applies on top of the driver-core-next branch of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git Before converting ttm to the new fence interface I had to fix some drivers to require a reservation before poking with fence_obj. After flipping the switch RCU becomes available instead, and the extra reservations can be dropped again. :-) I've done at least basic
2007 Jan 02
0
[PATCH 1/4] add scsi-target and IO_CMD_EPOLL_WAIT patches
...md; +-} ++} + 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); ++...
2011 Jul 21
10
[PATCH v5 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup
While testing raid-auto-repair patches I''m going to send out later, I just found the very last bug in my current scrub patch series: Changelog v4->v5: - fixed a deadlock when fixup is taking longer while scrub is about to end Original message follows: ------------------------ This patch set introduces two new features for scrub. They share the backref iteration code which is the