Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1623700 > unrolled thread
| Started by | Alexander Kochetkov <al.kochet@gmail.com> |
|---|---|
| First post | 2017-04-14 16:40 +0200 |
| Last post | 2017-04-14 16:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] dmaengine: pl330: don't emit code for one iteration loop Alexander Kochetkov <al.kochet@gmail.com> - 2017-04-14 16:40 +0200
| From | Alexander Kochetkov <al.kochet@gmail.com> |
|---|---|
| Date | 2017-04-14 16:40 +0200 |
| Subject | [PATCH 2/2] dmaengine: pl330: don't emit code for one iteration loop |
| Message-ID | <twayd-2cI-5@gated-at.bofh.it> |
The patch remove one iteration outer loop in the _loop().
Removing loop saves 4 bytes of MicroCode buffer. This
savings make sense for free-running cyclic transfer
implementation.
DMALP_0 0
...
DMALPENDA_0 bjmpto_9
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
---
drivers/dma/pl330.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 56a2377..6126dde 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -1268,7 +1268,7 @@ static inline int _loop(struct pl330_dmac *pl330, unsigned dry_run, u8 buf[],
lpend.bjump = 0;
szlpend = _emit_LPEND(1, buf, &lpend);
- if (lcnt0) {
+ if (lcnt0 > 1) {
szlp *= 2;
szlpend *= 2;
}
@@ -1284,7 +1284,7 @@ static inline int _loop(struct pl330_dmac *pl330, unsigned dry_run, u8 buf[],
off = 0;
- if (lcnt0) {
+ if (lcnt0 > 1) {
off += _emit_LP(dry_run, &buf[off], 0, lcnt0);
ljmp0 = off;
}
@@ -1300,7 +1300,7 @@ static inline int _loop(struct pl330_dmac *pl330, unsigned dry_run, u8 buf[],
lpend.bjump = off - ljmp1;
off += _emit_LPEND(dry_run, &buf[off], &lpend);
- if (lcnt0) {
+ if (lcnt0 > 1) {
lpend.cond = ALWAYS;
lpend.forever = false;
lpend.loop = 0;
@@ -1309,7 +1309,7 @@ static inline int _loop(struct pl330_dmac *pl330, unsigned dry_run, u8 buf[],
}
*bursts = lcnt1 * cyc;
- if (lcnt0)
+ if (lcnt0 > 1)
*bursts *= lcnt0;
return off;
--
1.7.9.5
Back to top | Article view | linux.kernel
csiph-web