Changeset 66e83e0e in rtems-libbsd


Ignore:
Timestamp:
May 19, 2017, 7:47:45 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
7ece7548c1b05cf6bb10e6708b83b2401d45c250, 29cc431e0bcfe059d65ac3019f53eeafa5064ae8
Children:
9da83e7
Parents:
1908686
git-author:
Sebastian Huber <sebastian.huber@…> (05/19/17 07:47:45)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/23/17 07:24:06)
Message:

soc/qbman: Simplify bman_release()

Get the affine portal only once for the complete transaction.

Signed-off-by: Sebastian Huber <sebastian.huber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • linux/drivers/soc/fsl/qbman/bman.c

    r1908686 r66e83e0e  
    736736        DPAA_ASSERT(num > 0 && num <= 8);
    737737
    738         do {
     738        while (1) {
    739739                p = get_affine_portal();
    740740                local_irq_save(irqflags);
     
    743743                        update_rcr_ci(p, avail);
    744744                r = bm_rcr_start(&p->p);
     745                if (likely(r))
     746                        break;
     747
    745748                local_irq_restore(irqflags);
    746749                put_affine_portal();
    747                 if (likely(r))
    748                         break;
    749 
     750                if (unlikely(--timeout == 0))
     751                        return -ETIMEDOUT;
    750752                udelay(1);
    751         } while (--timeout);
    752 
    753         if (unlikely(!timeout))
    754                 return -ETIMEDOUT;
    755 
    756         p = get_affine_portal();
    757         local_irq_save(irqflags);
     753        }
     754
    758755        /*
    759756         * we can copy all but the first entry, as this can trigger badness
Note: See TracChangeset for help on using the changeset viewer.