[svn-commits] sruffell: branch linux/sruffell/wctdm24xxp-cmdlist r9847 - /linux/team/sruffe...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Mar 16 16:39:46 CDT 2011
Author: sruffell
Date: Wed Mar 16 16:39:42 2011
New Revision: 9847
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9847
Log:
wcte12xp, wctdm24xxp: decriptor_list.count does not need to be atomic.
It is only ever accessed in interrupt context anyway. Saves several
hundred nanoseconds from hard interrupt context.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Modified:
linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.c
linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.h
Modified: linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=9847&r1=9846&r2=9847
==============================================================================
--- linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.c Wed Mar 16 16:39:42 2011
@@ -271,7 +271,7 @@
d->des1 = cpu_to_le32(des1);
}
d->des1 |= cpu_to_le32(END_OF_RING);
- atomic_set(&dl->count, 0);
+ dl->count = 0;
return 0;
}
@@ -326,7 +326,7 @@
d->buffer1 = 0;
}
d->des1 |= cpu_to_le32(END_OF_RING);
- atomic_set(&dl->count, 0);
+ dl->count = 0;
return 0;
}
@@ -497,7 +497,7 @@
}
dl->head = dl->tail = 0;
- atomic_set(&dl->count, 0);
+ dl->count = 0;
vb_enable_deferred(vb);
}
@@ -522,7 +522,7 @@
}
dl->head = 0;
dl->tail = 0;
- atomic_set(&dl->count, 0);
+ dl->count = 0;
vb_enable_deferred(vb);
}
@@ -727,7 +727,7 @@
dl->tail = (++tail) & DRING_MASK;
d->buffer1 = cpu_to_le32(vbb->dma_addr);
SET_OWNED(d); /* That's it until the hardware is done with it. */
- atomic_inc(&dl->count);
+ ++dl->count;
return 0;
}
@@ -753,7 +753,7 @@
d->buffer1 = cpu_to_le32(vbb->dma_addr);
dl->tail = (dl->tail + 1) & DRING_MASK;
SET_OWNED(d); /* That's it until the hardware is done with it. */
- atomic_inc(&dl->count);
+ ++dl->count;
return 0;
}
@@ -960,7 +960,7 @@
dl->pending[head] = NULL;
}
dl->head = (++head) & DRING_MASK;
- atomic_dec(&dl->count);
+ --dl->count;
vb_net_capture_vbb(vb, vbb, 1, d->des0, d->container);
return vbb;
}
@@ -981,7 +981,7 @@
vbb = dl->pending[head];
dl->head = (++head) & DRING_MASK;
d->buffer1 = 0;
- atomic_dec(&dl->count);
+ --dl->count;
vb_net_capture_vbb(vb, vbb, 0, d->des0, d->container);
*des0 = le32_to_cpu(d->des0);
return vbb;
@@ -1493,10 +1493,10 @@
while ((vbb = vb_get_completed_txb(vb)))
list_add_tail(&vbb->entry, &vb->tx_complete);
- if (unlikely(atomic_read(&dl->count) < 2)) {
+ if (unlikely(dl->count < 2)) {
softunderrun = 1;
d = vb_descriptor(dl, dl->head);
- if (1 == atomic_read(&dl->count))
+ if (1 == dl->count);
return;
behind = 2;
Modified: linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.h?view=diff&rev=9847&r1=9846&r2=9847
==============================================================================
--- linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.h (original)
+++ linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.h Wed Mar 16 16:39:42 2011
@@ -100,7 +100,7 @@
unsigned int tail;
void *pending[DRING_SIZE];
dma_addr_t desc_dma;
- atomic_t count;
+ unsigned long count;
unsigned int padding;
};
More information about the svn-commits
mailing list