search for: spin_lock_irqsav

Displaying 20 results from an estimated 1407 matches for "spin_lock_irqsav".

Did you mean: spin_lock_irqsave
2011 May 09
1
Bug#625438: [PATCH] xen: ioapic: avoid gcc 4.6 warnings about uninitialised variables
...; + union entry_union eu; + eu.w1 = (*read)(apic, 0x10 + 2 * pin); + eu.w2 = (*read)(apic, 0x11 + 2 * pin); + return eu.entry; +} + +static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin, int raw) +{ + struct IO_APIC_route_entry entry; + unsigned long flags; + + spin_lock_irqsave(&ioapic_lock, flags); + entry = __ioapic_read_entry(apic, pin, raw); + spin_unlock_irqrestore(&ioapic_lock, flags); + return entry; +} + +static void +__ioapic_write_entry(int apic, int pin, int raw, struct IO_APIC_route_entry e) +{ + void (*write)(unsigned int, unsigned int, u...
2011 May 09
1
Bug#625438: [PATCH] xen: ioapic: avoid gcc 4.6 warnings about uninitialised variables
...; + union entry_union eu; + eu.w1 = (*read)(apic, 0x10 + 2 * pin); + eu.w2 = (*read)(apic, 0x11 + 2 * pin); + return eu.entry; +} + +static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin, int raw) +{ + struct IO_APIC_route_entry entry; + unsigned long flags; + + spin_lock_irqsave(&ioapic_lock, flags); + entry = __ioapic_read_entry(apic, pin, raw); + spin_unlock_irqrestore(&ioapic_lock, flags); + return entry; +} + +static void +__ioapic_write_entry(int apic, int pin, int raw, struct IO_APIC_route_entry e) +{ + void (*write)(unsigned int, unsigned int, u...
2009 Jul 18
0
[PATCH 5/6] fs/btrfs: convert nested spin_lock_irqsave to spin_lock
From: Julia Lawall <julia@diku.dk> If spin_lock_irqsave is called twice in a row with the same second argument, the interrupt state at the point of the second call overwrites the value saved by the first call. Indeed, the second call does not need to save the interrupt state, so it is changed to a simple spin_lock. The semantic match that finds this...
2008 Mar 11
3
[PATCH 1/4] virtio: Use spin_lock_irqsave/restore for virtio-pci
From: Anthony Liguori <aliguori at us.ibm.com> virtio-pci acquires its spin lock in an interrupt context so it's necessary to use spin_lock_irqsave/restore variants. This patch fixes guest SMP when using virtio devices in KVM. Signed-off-by: Anthony Liguori <aliguori at us.ibm.com> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/virtio/virtio_pci.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 d...
2008 Mar 11
3
[PATCH 1/4] virtio: Use spin_lock_irqsave/restore for virtio-pci
From: Anthony Liguori <aliguori at us.ibm.com> virtio-pci acquires its spin lock in an interrupt context so it's necessary to use spin_lock_irqsave/restore variants. This patch fixes guest SMP when using virtio devices in KVM. Signed-off-by: Anthony Liguori <aliguori at us.ibm.com> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/virtio/virtio_pci.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 d...
2008 Jul 10
0
[PATCH] Substitue the duplicate spin_lock_irqsave to spin_lock in the vt-d code path
The patch removes the duplicate spin_lock_irqsave to spin_lock in the Vt-d code path. The duplicate spin_lock_irqsave() flushes the original EFLAGS saved, and thus disable the local irq. Signed-off-by: Xin, Xiaohui Xiaohui.xin@intel.com Signed-off-by: Tian, Kevin <Kevin.Tian@intel.com> ____________________________________________...
2010 Feb 07
3
[PATCH] drm/nouveau: don't hold spin lock while calling kzalloc with GFP_KERNEL
...>engine.graph; struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; struct nouveau_channel *chan; - unsigned long flags; int channel, user; int ret; @@ -204,8 +203,6 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret, return ret; } - spin_lock_irqsave(&dev_priv->engine.lock, flags); - /* disable the fifo caches */ pfifo->reassign(dev, false); @@ -225,8 +222,6 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret, pfifo->reassign(dev, true); - spin_unlock_irqrestore(&dev_priv->engine.l...
2011 Jan 26
8
[PATCH 1/8] staging: hv: Convert camel cased variables in connection.c to lower cases
...= (struct hv_monitor_page *)vmbus_connection.MonitorPages; debuginfo->monitorid = channel->offermsg.monitorid; @@ -265,10 +265,10 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, if (userdatalen) memcpy(openMsg->userdata, userdata, userdatalen); - spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); + spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); list_add_tail(&openInfo->msglistentry, - &gVmbusConnection.ChannelMsgList); - spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); + &vm...
2011 Jan 26
8
[PATCH 1/8] staging: hv: Convert camel cased variables in connection.c to lower cases
...= (struct hv_monitor_page *)vmbus_connection.MonitorPages; debuginfo->monitorid = channel->offermsg.monitorid; @@ -265,10 +265,10 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, if (userdatalen) memcpy(openMsg->userdata, userdata, userdatalen); - spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags); + spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); list_add_tail(&openInfo->msglistentry, - &gVmbusConnection.ChannelMsgList); - spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags); + &vm...
2019 May 07
3
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
On 4/25/19 10:00 PM, Pankaj Gupta wrote: > +void host_ack(struct virtqueue *vq) > +{ > + unsigned int len; > + unsigned long flags; > + struct virtio_pmem_request *req, *req_buf; > + struct virtio_pmem *vpmem = vq->vdev->priv; > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > + req->done = true; > + wake_up(&req->host_acked); > + > + if (!list_empty(&vpmem->req_list)) { > + req_buf = list_first_entry(&vpmem->req_list, > +...
2019 May 07
3
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
On 4/25/19 10:00 PM, Pankaj Gupta wrote: > +void host_ack(struct virtqueue *vq) > +{ > + unsigned int len; > + unsigned long flags; > + struct virtio_pmem_request *req, *req_buf; > + struct virtio_pmem *vpmem = vq->vdev->priv; > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > + req->done = true; > + wake_up(&req->host_acked); > + > + if (!list_empty(&vpmem->req_list)) { > + req_buf = list_first_entry(&vpmem->req_list, > +...
2016 Jan 01
5
[PATCH 2/2] virtio_balloon: fix race between migration and ballooning
...alloon_compaction.c > index d3116be5a00f..300117f1a08f 100644 > --- a/mm/balloon_compaction.c > +++ b/mm/balloon_compaction.c > @@ -61,6 +61,7 @@ struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info) > bool dequeued_page; > > dequeued_page = false; > + spin_lock_irqsave(&b_dev_info->pages_lock, flags); > list_for_each_entry_safe(page, tmp, &b_dev_info->pages, lru) { > /* > * Block others from accessing the 'page' while we get around > @@ -75,15 +76,14 @@ struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_in...
2016 Jan 01
5
[PATCH 2/2] virtio_balloon: fix race between migration and ballooning
...alloon_compaction.c > index d3116be5a00f..300117f1a08f 100644 > --- a/mm/balloon_compaction.c > +++ b/mm/balloon_compaction.c > @@ -61,6 +61,7 @@ struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info) > bool dequeued_page; > > dequeued_page = false; > + spin_lock_irqsave(&b_dev_info->pages_lock, flags); > list_for_each_entry_safe(page, tmp, &b_dev_info->pages, lru) { > /* > * Block others from accessing the 'page' while we get around > @@ -75,15 +76,14 @@ struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_in...
2017 Jan 30
2
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...vaddr_use; @@ -184,11 +184,10 @@ gk20a_instobj_acquire_iommu(struct nvkm_memory *memory) struct gk20a_instmem *imem = node->base.imem; struct nvkm_ltc *ltc = imem->base.subdev.device->ltc; const u64 size = nvkm_memory_size(memory); - unsigned long flags; nvkm_ltc_flush(ltc); - spin_lock_irqsave(&imem->lock, flags); + mutex_lock(&imem->lock); if (node->base.vaddr) { if (!node->use_cpt) { @@ -216,7 +215,7 @@ gk20a_instobj_acquire_iommu(struct nvkm_memory *memory) out: node->use_cpt++; - spin_unlock_irqrestore(&imem->lock, flags); + mutex_unlock(&am...
2011 Feb 14
1
[PATCH] Staging: hv: Use list_entry for msg_info and remove associated comment
...etions(-) diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c index a9c9d49..6c497e9 100644 --- a/drivers/staging/hv/channel_mgmt.c +++ b/drivers/staging/hv/channel_mgmt.c @@ -580,8 +580,9 @@ static void vmbus_onopen_result(struct vmbus_channel_message_header *hdr) spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); list_for_each(curr, &vmbus_connection.chn_msg_list) { -/* FIXME: this should probably use list_entry() instead */ - msginfo = (struct vmbus_channel_msginfo *)curr; + msginfo = list_entry(curr, struct vmbus_channel_msginfo, + msglistentry)...
2011 Feb 14
1
[PATCH] Staging: hv: Use list_entry for msg_info and remove associated comment
...etions(-) diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c index a9c9d49..6c497e9 100644 --- a/drivers/staging/hv/channel_mgmt.c +++ b/drivers/staging/hv/channel_mgmt.c @@ -580,8 +580,9 @@ static void vmbus_onopen_result(struct vmbus_channel_message_header *hdr) spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); list_for_each(curr, &vmbus_connection.chn_msg_list) { -/* FIXME: this should probably use list_entry() instead */ - msginfo = (struct vmbus_channel_msginfo *)curr; + msginfo = list_entry(curr, struct vmbus_channel_msginfo, + msglistentry)...
2012 Mar 09
2
[PATCH] linux-2.6.18/gnttab: add deferred freeing logic
...LIST_HEAD(deferred_list); +static void gnttab_handle_deferred(unsigned long); +static DEFINE_TIMER(deferred_timer, gnttab_handle_deferred, 0, 0); + +static void gnttab_handle_deferred(unsigned long unused) +{ + unsigned int nr = 10; + struct deferred_entry *first = NULL; + unsigned long flags; + + spin_lock_irqsave(&gnttab_list_lock, flags); + while (nr--) { + struct deferred_entry *entry + = list_first_entry(&deferred_list, + struct deferred_entry, list); + + if (entry == first) + break; + list_del(&entry->list); + spin_unlock_irqrestore(&gnttab_list_lock, flags); + if (_g...
2015 Oct 26
2
[PATCH] instmem/gk20a: exclusively acquire instobjs
...(struct nvkm_memory *memory) struct gk20a_instobj *node = gk20a_instobj(memory); struct gk20a_instmem *imem = node->imem; struct nvkm_ltc *ltc = imem->base.subdev.device->ltc; - const u64 size = nvkm_memory_size(memory); - unsigned long flags; + u64 size; nvkm_ltc_flush(ltc); - spin_lock_irqsave(&imem->lock, flags); + spin_lock_irqsave(&imem->lock, imem->flags); if (node->vaddr) { /* remove us from the LRU list since we cannot be unmapped */ @@ -202,6 +202,8 @@ gk20a_instobj_acquire(struct nvkm_memory *memory) goto out; } + size = nvkm_memory_size(memory)...
2016 Jan 09
1
[PATCH 2/2] virtio_balloon: fix race between migration and ballooning
...> > --- a/mm/balloon_compaction.c > > > +++ b/mm/balloon_compaction.c > > > @@ -61,6 +61,7 @@ struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info) > > > bool dequeued_page; > > > > > > dequeued_page = false; > > > + spin_lock_irqsave(&b_dev_info->pages_lock, flags); > > > list_for_each_entry_safe(page, tmp, &b_dev_info->pages, lru) { > > > /* > > > * Block others from accessing the 'page' while we get around > > > @@ -75,15 +76,14 @@ struct page *balloon_page_d...
2016 Jan 09
1
[PATCH 2/2] virtio_balloon: fix race between migration and ballooning
...> > --- a/mm/balloon_compaction.c > > > +++ b/mm/balloon_compaction.c > > > @@ -61,6 +61,7 @@ struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info) > > > bool dequeued_page; > > > > > > dequeued_page = false; > > > + spin_lock_irqsave(&b_dev_info->pages_lock, flags); > > > list_for_each_entry_safe(page, tmp, &b_dev_info->pages, lru) { > > > /* > > > * Block others from accessing the 'page' while we get around > > > @@ -75,15 +76,14 @@ struct page *balloon_page_d...