aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
diff options
context:
space:
mode:
authorRussell King - ARM Linux <[email protected]>2012-03-06 22:36:07 +0000
committerVinod Koul <[email protected]>2012-03-13 11:37:33 +0530
commit2a926e46022ad7a03e0ac167d8c2b0d88c12c5a8 (patch)
tree7e31a02d6e6d90571d6dd88ebf31db2e5ca8d5c0 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
parentd3ee98cdcd6198ea1cf75c603178acc8a805b69b (diff)
dmaengine: fix cookie handling in iop-adma.c and ppc4xx/adma.c
Dan Williams said: > > Russell King wrote: > > Firstly, we have DMA_MIN_COOKIE which has value 1 - so any cookies below > > that aren't valid.  That seems sane. > > > > We seem to have different behaviours: > > > > -       cookie = c->cookie; > > -       cookie++; > > -       if (cookie < 0) > > -               cookie = 1; > > -       c->cookie = cookie; > > -       tx->cookie = cookie; > > > > c->cookie here is initialized to zero, so the first cookie given out will > > be 1.  This is how most DMA engine drivers implement this. > > > > Then we have this: > > > >                cookie = chan->common.cookie; > >                cookie++; > >                if (cookie <= 1) > >                        cookie = 2; > > > >                /* initialize the completed cookie to be less than > >                 * the most recently used cookie > >                 */ > >                chan->common.completed_cookie = cookie - 1; > >                chan->common.cookie = sw_desc->async_tx.cookie = cookie; > > > > Again, chan->common.cookie starts off at 0.  The first cookie given out > > will be 2, and 1 will never be used.  There are three drivers which > > implement it this way. > > > > Why is there this difference, and can these three be corrected to behave > > the same way as the first (and therefore the assignment of cookies > > consolidated?) > > Yes, they should be consolidated, and I believe they have drifted only > because there were no good common helpers and murphy's law took over. So lets fix this up to use the common dma_cookie_assign() helper. Signed-off-by: Russell King <[email protected]> Tested-by: Linus Walleij <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Acked-by: Jassi Brar <[email protected]> [imx-sdma.c & mxs-dma.c] Tested-by: Shawn Guo <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions