Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318376
b: refs/heads/master
c: a8ea07c
h: refs/heads/master
v: v3
  • Loading branch information
Kim Phillips authored and Herbert Xu committed Jun 27, 2012
1 parent 2c49189 commit c51f44f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4bba1e9f41d68279ff2c17db53fbd379692b10bc
refs/heads/master: a8ea07c21d40cf17dd9cbe3cbf87d477b26c354f
17 changes: 5 additions & 12 deletions trunk/drivers/crypto/caam/jr.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ static void caam_jr_dequeue(unsigned long devarg)
u32 *userdesc, userstatus;
void *userarg;

spin_lock_bh(&jrp->outlock);
while (rd_reg32(&jrp->rregs->outring_used)) {

head = ACCESS_ONCE(jrp->head);
sw_idx = tail = jrp->tail;
head = ACCESS_ONCE(jrp->head);

while (CIRC_CNT(head, tail, JOBR_DEPTH) >= 1 &&
rd_reg32(&jrp->rregs->outring_used)) {
spin_lock_bh(&jrp->outlock);

sw_idx = tail = jrp->tail;
hw_idx = jrp->out_ring_read_index;

for (i = 0; CIRC_CNT(head, tail + i, JOBR_DEPTH) >= 1; i++) {
sw_idx = (tail + i) & (JOBR_DEPTH - 1);

Expand Down Expand Up @@ -121,15 +121,8 @@ static void caam_jr_dequeue(unsigned long devarg)

/* Finally, execute user's callback */
usercall(dev, userdesc, userstatus, userarg);

spin_lock_bh(&jrp->outlock);

head = ACCESS_ONCE(jrp->head);
sw_idx = tail = jrp->tail;
}

spin_unlock_bh(&jrp->outlock);

/* reenable / unmask IRQs */
clrbits32(&jrp->rregs->rconfig_lo, JRCFG_IMSK);
}
Expand Down

0 comments on commit c51f44f

Please sign in to comment.