Explorar o código

crypto: talitos - don't set done notification in hot path

IRQ done notification is always set.  Remove its explicit
assignment from the hot path by including it in the
descriptor header template assignment in talitos_cra_init.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Kim Phillips %!s(int64=14) %!d(string=hai) anos
pai
achega
602dba5a81
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      drivers/crypto/talitos.c

+ 3 - 3
drivers/crypto/talitos.c

@@ -302,9 +302,6 @@ static int talitos_submit(struct device *dev, int ch, struct talitos_desc *desc,
 	unsigned long flags;
 	unsigned long flags;
 	int head;
 	int head;
 
 
-	/* select done notification */
-	desc->hdr |= DESC_HDR_DONE_NOTIFY;
-
 	spin_lock_irqsave(&priv->chan[ch].head_lock, flags);
 	spin_lock_irqsave(&priv->chan[ch].head_lock, flags);
 
 
 	if (!atomic_inc_not_zero(&priv->chan[ch].submit_count)) {
 	if (!atomic_inc_not_zero(&priv->chan[ch].submit_count)) {
@@ -2264,6 +2261,9 @@ static int talitos_cra_init(struct crypto_tfm *tfm)
 	/* copy descriptor header template value */
 	/* copy descriptor header template value */
 	ctx->desc_hdr_template = talitos_alg->algt.desc_hdr_template;
 	ctx->desc_hdr_template = talitos_alg->algt.desc_hdr_template;
 
 
+	/* select done notification */
+	ctx->desc_hdr_template |= DESC_HDR_DONE_NOTIFY;
+
 	return 0;
 	return 0;
 }
 }