Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
"This push fixes a build error on 32-bit archs in the hifn driver as
well as a potential deadlock in the caam driver."

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: caam - fix possible deadlock condition
crypto: hifn_795x - fix 64bit division and undefined __divdi3 on 32bit archs

+7 -7
+5 -5
drivers/crypto/caam/jr.c
··· 63 63 64 64 head = ACCESS_ONCE(jrp->head); 65 65 66 - spin_lock_bh(&jrp->outlock); 66 + spin_lock(&jrp->outlock); 67 67 68 68 sw_idx = tail = jrp->tail; 69 69 hw_idx = jrp->out_ring_read_index; ··· 115 115 jrp->tail = tail; 116 116 } 117 117 118 - spin_unlock_bh(&jrp->outlock); 118 + spin_unlock(&jrp->outlock); 119 119 120 120 /* Finally, execute user's callback */ 121 121 usercall(dev, userdesc, userstatus, userarg); ··· 236 236 return -EIO; 237 237 } 238 238 239 - spin_lock(&jrp->inplock); 239 + spin_lock_bh(&jrp->inplock); 240 240 241 241 head = jrp->head; 242 242 tail = ACCESS_ONCE(jrp->tail); 243 243 244 244 if (!rd_reg32(&jrp->rregs->inpring_avail) || 245 245 CIRC_SPACE(head, tail, JOBR_DEPTH) <= 0) { 246 - spin_unlock(&jrp->inplock); 246 + spin_unlock_bh(&jrp->inplock); 247 247 dma_unmap_single(dev, desc_dma, desc_size, DMA_TO_DEVICE); 248 248 return -EBUSY; 249 249 } ··· 265 265 266 266 wr_reg32(&jrp->rregs->inpring_jobadd, 1); 267 267 268 - spin_unlock(&jrp->inplock); 268 + spin_unlock_bh(&jrp->inplock); 269 269 270 270 return 0; 271 271 }
+2 -2
drivers/crypto/hifn_795x.c
··· 821 821 /* 822 822 * We must wait at least 256 Pk_clk cycles between two reads of the rng. 823 823 */ 824 - dev->rng_wait_time = DIV_ROUND_UP(NSEC_PER_SEC, dev->pk_clk_freq) * 825 - 256; 824 + dev->rng_wait_time = DIV_ROUND_UP_ULL(NSEC_PER_SEC, 825 + dev->pk_clk_freq) * 256; 826 826 827 827 dev->rng.name = dev->name; 828 828 dev->rng.data_present = hifn_rng_data_present,